Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4267 Vizualizări

Hey guys i am trying to inherit into this model called stock.picking

i was able to successfully inherit into it and create a field in form view but i want add a field in this order lines of that form view from where i can find the inherit_ field name of the orderlines in odoo , i want to inherit into the lines which is marked in red colour, can anyone tell me how it is possible, Thank you 



Imagine profil
Abandonează
Cel mai bun răspuns

At first, inherit stock.move class and add your custom field:

class StockMove(models.Model):
_inherit = 'stock.move'

 custom_field
= fields.FieldType('My field')

then inherit 'view_picking_form' view to add your custom field inside the field with the name 'move_ids_without_package'.

Imagine profil
Abandonează
Autor

<record id="internal_issuance_engineer_name" model="ir.ui.view">
<field name="name">stock.move.inherited.engineer.name</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page/field[@name='move_ids_without_package']/tree/field[@name='product_id']" position="after">
<field name="name_issuance"/>
</xpath>
</field>
</record>

i wrote this in xml side and it is working fine

Related Posts Răspunsuri Vizualizări Activitate
1
ian. 22
2528
0
iun. 21
2984
3
feb. 24
4917
2
oct. 23
3122
1
apr. 23
3740