[6.0] Editable tree view ignore many2many fields values on save

Bug #598152 reported by Borja López Soilán (NeoPolus)
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Low
OpenERP sa GTK client R&D

Bug Description

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).

Related branches

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :
description: updated
tfr (Openerp) (tfr)
Changed in openobject-client:
status: New → Confirmed
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Low
tfr (Openerp) (tfr)
Changed in openobject-client:
milestone: none → 6.0-rc2
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Borja López Soilán,

Thanks a lot for pointing out the issue. It has been fixes in trunk client with revision-info as
1690 <email address hidden>

Thanks,

Changed in openobject-client:
status: Confirmed → In Progress
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.