Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
You may try like this:
from openerp import models, fields, api
_inherit = 'product.template'
model_mat = fields.Char('Model de materiel')
num_ligne = fields.Integer('N° ligne')
<record id="view_product_form_inherit" model="ir.ui.view">
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//page" position="inside">
And please note when you inherit multiple models, use _inherits instead of _inherit.
it worked thankyou,but only after seperating classes in other py file, if I may say that the reason why it was not working earlier is that I have declared 2 classes in the same .py file using different objects and importing from different classes the first one using osv.osv the other one using models.Model and when importing each one's fields there happens the Conflict between the two classes because one is declaring a field.Char and the other one is using field.char which causes "as I think" this error that it was giving me : odoo AttributeError: 'module' object has no attribute 'char'
so I was doing like this in same file which is uncorrect I think
from openerp import models, fields, api from openerp.osv import fields, osv
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/12/16, 5:46 AM|
|Seen: 2330 times|
|Last updated: 1/15/16, 4:22 AM|