You have been assigned a bug task for a public bug by tfr (Openerp) (tfr):

On 6.0, views with editable tree widgets ignore the many2many field
values (like invoice_line_tax_id) when writing the record. This did not
happen on the 5.0 GTK client.

For example (take a look at the video) the old
account.invoice.supplier.form (I think it just got refactored on the
lastest trunk revisions) has something like this:

<tree string="Invoice lines" editable="top">
    ...
    <field name="invoice_line_tax_id" view_mode="2" 
context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>

If you try to edit an invoice line on the list, and add some tax to it
(using F1 key on the taxes field), the field gets modified on screen (it
shows "(1)" instead of "(0)", and you can press F2 to see the selected
tax), but is not sent to the server when saving the record (*). If you
edit the line on a pop-up view or form mode, the value gets saved (**).

* Request made when saving an invoice with a line edited inline
(editable tree view):

DEBUG_RPC:rpc.request:('execute', 'test_5_2', 1, 'admin',
('account.invoice', 'write', [565], {'tax_line': [], 'invoice_line':
[(1, 759, {'origin': False, 'uos_id': False, 'account_id': 1337, 'name':
u'Something', 'price_unit': 12.0, 'company_id': 1,
'invoice_line_tax_id': [(6, 0, [])], 'note': False, 'discount': False,
'account_analytic_id': False, 'quantity': 1.0, 'product_id': False})]},
{'lang': u'en_US', 'active_ids': [241], 'tz': False, 'active_model':
'ir.ui.menu', 'section_id': False, 'active_id': 241, 'project_id':
False, 'type': 'in_invoice', 'department_id': False}))

** Request made when saving a record edited on pop-up form:

DEBUG_RPC:rpc.request:('execute', 'test_5_2', 1, 'admin',
('account.invoice', 'write', [565], {'tax_line': [], 'invoice_line':
[(1, 759, {'origin': False, 'uos_id': False, 'account_id': 1337, 'name':
'Something', 'price_unit': 12.0, 'company_id': 1, 'invoice_line_tax_id':
[(6, 0, [5])], 'note': False, 'discount': False, 'account_analytic_id':
False, 'quantity': 1.0, 'product_id': False})]}, {'lang': u'en_US',
'active_ids': [241], 'tz': False, 'active_model': 'ir.ui.menu',
'section_id': False, 'active_id': 241, 'project_id': False, 'type':
'in_invoice', 'department_id': False}))

It's easy to see that the invoice_line_tax_id field is not updated when
the user edits it inline (editable tree view).

** Affects: openobject-client
     Importance: Low
     Assignee: OpenERP sa GTK client R&D (openerp-dev-gtk)
         Status: Confirmed

-- 
[6.0] Editable tree view ignore many2many fields values on save
https://bugs.launchpad.net/bugs/598152
You received this bug notification because you are a member of OpenERP sa GTK 
client R&D, which is a bug assignee.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to