mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract: remove groupby if it is in context
Co-authored by @Lopsanz
This commit is contained in:
@@ -46,14 +46,11 @@ class ResPartner(models.Model):
|
||||
contract_type = self._context.get('contract_type')
|
||||
|
||||
res = self._get_act_window_contract_xml(contract_type)
|
||||
res.update(
|
||||
context=dict(
|
||||
self.env.context,
|
||||
search_default_partner_id=self.id,
|
||||
default_partner_id=self.id,
|
||||
default_pricelist_id=self.property_product_pricelist.id,
|
||||
),
|
||||
)
|
||||
action_context = {k: v for k, v in self.env.context.items() if k != "group_by"}
|
||||
action_context["search_default_partner_id"] = self.id
|
||||
action_context["default_partner_id"] = self.id
|
||||
action_context["default_pricelist_id"] = self.property_product_pricelist.id
|
||||
res["context"] = action_context
|
||||
return res
|
||||
|
||||
def _get_act_window_contract_xml(self, contract_type):
|
||||
|
||||
Reference in New Issue
Block a user