Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5427 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
zář 22
2693
1
led 18
3204
1
dub 25
137
0
lis 24
1863
3
čvc 24
29842