Skip to content

Commit

Permalink
Merge PR OCA#641 into 13.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Mar 10, 2021
2 parents f2a4690 + a0da14b commit ebc4781
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contract/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2017 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from ast import literal_eval

from odoo import fields, models


Expand Down Expand Up @@ -55,10 +57,12 @@ def act_show_contract(self):

res = self._get_act_window_contract_xml(contract_type)
action_context = {k: v for k, v in self.env.context.items() if k != "group_by"}
action_context["domain"] = self._get_partner_contract_domain()
action_context["default_partner_id"] = self.id
action_context["default_pricelist_id"] = self.property_product_pricelist.id
res["context"] = action_context
res["domain"] = (
literal_eval(res["domain"]) + self._get_partner_contract_domain()
)
return res

def _get_act_window_contract_xml(self, contract_type):
Expand Down

0 comments on commit ebc4781

Please sign in to comment.