Bonjour,
je tente de rajouter un nouveau champ via un module custom dans la vue "Ordre de travail" du module MRP et je suis confronté à l'erreur suivante : "except_orm: ('ValidateError', u'Une erreur est apparue lors de la validation du/des champ(s) arch: Invalid XML for View Architecture!')"
voici le bout de code utilisé dans mon module:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 class custom_odt(osv.osv): _inherit = "mrp.production.workcenter.line" _columns = { 'tot': fields.float('Tot', size=2), } custom_odt()pourtant j'ai utilisé le même type de code pour ajouter également un nouveau champ dans la vue "Article" et ça fonctionne sans pb ??
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <record model="ir.ui.view" id="custom_odt"> <field name="name">mrp.production.workcenter.line.form</field> <field name="model">mrp.production.workcenter.line</field> <field name="inherit_id" ref="mrp_operations.mrp_production_workcenter_form_view_inherit"/> <field name="arch" type="xml"> <xpath expr="/form/sheet/notebook/page/group/group[@string='Actual Production Date']/field[@name='delay']" position="after"> <field name="tot"/> </xpath> </field> </record>
Partager