You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
608B

  1. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  2. from odoo import models
  3. class AbstractActionMixin(models.AbstractModel):
  4. _name = "abstract.action.mixin"
  5. _description = "Abstract Action Mixin"
  6. def action_open(self):
  7. self.ensure_one()
  8. action = self.env.ref(
  9. "github_connector_odoo.%s" % self._context.get("xml_id")
  10. ).read()[0]
  11. action["context"] = dict(self.env.context)
  12. action["context"].pop("group_by", None)
  13. action["context"]["search_default_" + self._context.get("field_name")] = self.id
  14. return action
上海开阖软件有限公司 沪ICP备12045867号-1