[IMP] - set date_invoice as default group by for forecast pivot view

This commit is contained in:
sbejaoui
2019-03-14 15:35:08 +01:00
parent 9558ed1a8f
commit ac208c3d46
2 changed files with 7 additions and 4 deletions

View File

@@ -11,11 +11,14 @@ class AccountAnalyticAccount(models.Model):
@api.multi
def action_show_contract_forecast(self):
self.ensure_one()
context = {'search_default_groupby_date_invoice': True}
context.update(self.env.context)
return {
"type": "ir.actions.act_window",
"name": _("Contract Forecast"),
"res_model": "contract.line.forecast.period",
"domain": [("contract_id", "=", self.id)],
"view_mode": "pivot,tree",
"context": self.env.context,
"context": context,
}