account default journal not using defaults
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Committed
|
Low
|
OpenERP R&D Addons Team 3 |
Bug Description
account/
this code selects an arbitrary (first) journal which matches the condition
def _get_journal(self, cr, uid, context=None):
if context is None:
context = {}
type_inv = context.get('type', 'out_invoice')
user = self.pool.
company_id = context.
journal_obj = self.pool.
res = journal_
the defaults are defined as
select id,name,key2,value from ir_values where model like '%invoi%' and name ='journal_id' ;
id | name | key2 | value
------+
2283 | journal_id | | I2 +
| | | .
2284 | journal_id | partner_id=84 | I13 +
| | | .
2285 | journal_id | partner_id=85 | I13 +
| | | .
2286 | journal_id | partner_id=83 | I13 +
| | | .
(4 rows)
the _get_journal function
must respect the existing defaults
patch follows soon
Related branches
- Fabien (Open ERP): Disapprove
- Amit Parik (community): Approve
-
Diff: 44 lines (+20/-7)1 file modifiedaccount/account_invoice.py (+20/-7)
this patch fixes the issue that the correct default value is returned.
nevertheless the returned value is not used