[trunk][account][low] Inversion of two columns in a many2many field
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP R&D Addons Team 3 |
Bug Description
Addons: revno. 4372
By browsing the table account_
- move_id
- statement_id
The first should refers to account_move, the second to account_
By using openerp, I have some values inserted into the database. It seems that move_id contains values that should be in statement_id and inversely.
In fact it's easy to change this. You just have to go to account/
'move_ids': fields.
'account_
'Moves'),
by :
'move_ids': fields.
'account_
'Moves'),
It's not so important because of ORM methods use (like browse, etc.). But imagine someone develop a module which use a sql query like in account/
Thanks for advance about this non-critical bug but important for those who parses the database and develops modules ;)
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedaccount/account_bank_statement.py (+1/-1)
Changed in openobject-addons: | |
status: | Invalid → New |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
Note that this should appears frequently if the documentation give 2 versions of "how make a many2many". Have a look : http:// doc.openerp. com/developer/ 2_5_Objects_ Fields_ Methods/ field_type. html#relational -types
First we read this :
fields. many2many( 'other. object. name',
'relation object',
'actual. object. id',
'other. object. id',
'Field Name')
Then we read this :
class other_object_ name2(osv. osv):
'other_ fields' : fields.many2many(
'actual. object. name',
'relation object',
'actual. object. id',
'other. object. id', name2()
_inherit = 'other.object.name'
_columns = {
'Other Field Name'),
}
other_object_
The other.object.id is at the fourth place, then @t third place.