Skip to Content
Menu
This question has been flagged
1 Reply
3155 Views

I am using Odoo 8 with analytic accounts to track payments in each contract.

I have found a few occurrances where users will select the correct customer when creating an invoice, but then mistakenly select an analytic account of another customer when entering the invoice lines. Is it possible to filter the analytic account list according to which customer is selected?

Avatar
Discard
Best Answer

dear Daniel Holden,

Yes you can do it by adding this domain:s

('partner_id', '=', parent.partner_id)
on your addons>>account>>account_invoice_view.xml>>
on invoice_form: id >>

 

<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
                                        domain="[('type','!=','view'), ('company_id', '=', parent.company_id), ('state','not in',('close','cancelled'))]"/>


I hope I helped you...
Avatar
Discard
Author

It worked perfectly. Thank you so much!

Hi Ayman, how can i do this in the version 15? Thanks