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):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("agreement.agreement_action")
|
||||
result = action.read()[0]
|
||||
result["domain"] = [("partner_id", "=", self.id)]
|
||||
result["context"] = {
|
||||
"default_partner_id": self.id,
|
||||
}
|
||||
return result
|
||||
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||
"agreement.agreement_action"
|
||||
)
|
||||
action.update(
|
||||
{
|
||||
"domain": [("partner_id", "=", self.id)],
|
||||
"context": {"default_partner_id": self.id},
|
||||
}
|
||||
)
|
||||
return action
|
||||
|
||||
Reference in New Issue
Block a user