[FIX] contract: remove groupby if it is in context

Co-authored by @Lopsanz
This commit is contained in:
nans
2021-02-15 10:27:45 +01:00
committed by Francisco Ivan Anton Prieto
parent 896aa125a5
commit 3885e084ad

View File

@@ -50,14 +50,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):