This question has been flagged
1 Reply
4200 Views

Our Salesmen are able to invoice using different Sales Journals. I have modified the account.invoice.form view so that Sales users can choose the Specific Sales Journal when creating the invoice by modifying the following line:

<field name="journal_id" groups="account.group_account_user" options="{'no_create': True}" attrs="{'readonly':[('move_name','!=',False)]}"/>

changed to 

<field name="journal_id" options="{'no_create': True}" attrs="{'readonly':[('move_name','!=',False)]}"/>

However, now Salesmen can select ALL sales journals from the dropdown, and only 1 or 2 correspond to the salesman / Sales Team.

Is there any way to filter these Journals by user or sales team so that only certain journals can be chosen?



Avatar
Discard
Best Answer

Specifying Sales Journal to each User, doesn't make any sense at all, because Journal is meant to group & categories the Chart of Accounts of your Company, so it is best to have one Sales Journal per company to avoid complexity and confusion.

But if you still want to use different journals for each user, then change the logic accordingly, probably in _default_journal method if you are using Odoo 9 or 10 or in default_get method,  where the logic of fetching Journal for that company is written, override the same to suit your requirement,  

Avatar
Discard