[V 7.0] Default journal on customer invoice not taken into account from Order
Bug #1185010 reported by
Els Van Vossel (Foxy)
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Committed
|
Undecided
|
OpenERP Publisher's Warranty Team |
Bug Description
Latest version 7.0
Demo database
Install Belgian accounting.
Create manual sales invoice. Select the sales journal "Verkoopjournaal" instead of Sales Journal Test.
Set the journal Verkoopjournaal as default value for customer invoices.
Create a new manual invoice: the default journal "Verkoopjournaal" is proposed correctly.
Now create an invoice from a sales order. The default journal is not taken into account.
Please correct.
Regards,
Els Van Vossel
Related branches
lp:~openerp-dev/openobject-addons/7.0-opw-593107-acl
Ready for review
for merging
into
lp:openobject-addons/7.0
- OpenERP R&D Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedaccount/account_invoice.py (+1/-1)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
Changed in openobject-addons: | |
status: | New → Fix Committed |
To post a comment you must log in.
Answer Openerp :
Let me explain you how it works in OpenERP.
1: User defined defaults( unconditionally ) will only be used in a model if that field is not passed explicitly to the create vals dictionary.
2: if the value of the field is passed explicitly then the user defaults nor defaults defined on the model will not be used.
3: if the value of the field is not passed explicitly but is defined on the model (_defaults) then that default value will be overridden by new user defined value.
In your case you are trying to set a default value on Journal field and when you create an invoice from the sale order at that time the default journal is explicitly passed in the parameter while creating invoice.
Hope this makes things clear !