Merge PR #630 into 12.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2021-02-15 12:55:22 +00:00

View File

@@ -46,14 +46,11 @@ class ResPartner(models.Model):
contract_type = self._context.get('contract_type') contract_type = self._context.get('contract_type')
res = self._get_act_window_contract_xml(contract_type) res = self._get_act_window_contract_xml(contract_type)
res.update( action_context = {k: v for k, v in self.env.context.items() if k != "group_by"}
context=dict( action_context["search_default_partner_id"] = self.id
self.env.context, action_context["default_partner_id"] = self.id
search_default_partner_id=self.id, action_context["default_pricelist_id"] = self.property_product_pricelist.id
default_partner_id=self.id, res["context"] = action_context
default_pricelist_id=self.property_product_pricelist.id,
),
)
return res return res
def _get_act_window_contract_xml(self, contract_type): def _get_act_window_contract_xml(self, contract_type):