Browse Source

[10.0][IMP] account_financial_report_qweb: Add salesperson filter selection in open_items_wizard

pull/382/head
Roberto Fichera 7 years ago
parent
commit
0b01b03309
  1. 3
      account_financial_report_qweb/wizard/open_items_wizard.py
  2. 3
      account_financial_report_qweb/wizard/open_items_wizard_view.xml

3
account_financial_report_qweb/wizard/open_items_wizard.py

@ -45,6 +45,8 @@ class OpenItemsReportWizard(models.TransientModel):
string='Filter partners',
)
user_id = fields.Many2one('res.users', string='Salesman')
@api.onchange('receivable_accounts_only', 'payable_accounts_only')
def onchange_type_accounts_only(self):
"""Handle receivable/payable accounts only change."""
@ -79,6 +81,7 @@ class OpenItemsReportWizard(models.TransientModel):
'company_id': self.company_id.id,
'filter_account_ids': [(6, 0, self.account_ids.ids)],
'filter_partner_ids': [(6, 0, self.partner_ids.ids)],
'user_id': self.user_id.id,
}
def _export(self, xlsx_report=False):

3
account_financial_report_qweb/wizard/open_items_wizard_view.xml

@ -18,6 +18,9 @@
<field name="target_move" widget="radio"/>
<field name="hide_account_balance_at_0"/>
</group>
<group name="salesman_filters">
<field name="user_id"/>
</group>
</group>
<label for="partner_ids"/>
<field name="partner_ids" nolabel="1" options="{'no_create': True}"/>

Loading…
Cancel
Save