mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] agreement_legal: fix action open agreement
This commit is contained in:
@@ -22,10 +22,13 @@ class Partner(models.Model):
|
|||||||
|
|
||||||
def action_open_agreement(self):
|
def action_open_agreement(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
action = self.env.ref("agreement.agreement_action")
|
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||||
result = action.read()[0]
|
"agreement.agreement_action"
|
||||||
result["domain"] = [("partner_id", "=", self.id)]
|
)
|
||||||
result["context"] = {
|
action.update(
|
||||||
"default_partner_id": self.id,
|
{
|
||||||
}
|
"domain": [("partner_id", "=", self.id)],
|
||||||
return result
|
"context": {"default_partner_id": self.id},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return action
|
||||||
|
|||||||
Reference in New Issue
Block a user