Odoo Help


Save of many2one fields problem

on 4/29/13, 1:40 AM 1,591 views

Hello, I have the following code for improve mrp_repair (7.0-20130307-002146):

from openerp.osv import osv, fields
from openerp.tools.translate import _

class a_repair(osv.osv):
    _name = 'mrp.repair'
    _inherit = 'mrp.repair'

    _columns = {
        'user_id': fields.many2one('res.users', 'Repairer', translate=True),
        'complete_name': fields.many2one('account.analytic.account', 'Contract', translate=True),


<?xml version="1.0" encoding="utf-8"?>
       <record id="view_repair_order_form" model="ir.ui.view">
       <field name="name">mrp.repair.form.inherit</field>
       <field name="model">mrp.repair</field>
       <field name="inherit_id" ref="mrp_repair.view_repair_order_form" />
       <field name="arch" type="xml">
           <field name="address_id" position="after">
          <field name="user_id"/>
          <field name="complete_name"/>


with additional simple fields. When I create new record, I can success to set and to save all fields, but when I try to change and to save user_id and/or complete_name fields (early saved), in result these fields are empty. Another simple fields are saved. Could you recommend how to save user_id and complete_name fields or solution for insert user and contract to repair form?

Thank you for advice!

in which version of openerp you are using

on 4/30/13, 12:00 PM

Hello, I use OpenERP 7 (7.0-20130307-002146).

on 5/6/13, 9:52 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/29/13, 1:40 AM
Seen: 1591 times
Last updated: 3/16/15, 8:10 AM