I tried to inherit the treeview of stock.picking, if I try to modify the inherited treeview and make it editable, this change also occurs on the parent treeview. How can I avoid it? Is there any error in my source?
Thanks in advance
This is my code.
wizard.xml
<record id="shipping_carrier.picktree" model="ir.ui.view">
<field name="name">shipping.picking.tree</field>
<field name="model">stock.picking</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="location_dest_id" readonly="1"/>
<field name="partner_id"/>
<field name="date" invisible="1"/>
<field name="min_date"/>
<field name="origin"/>
<field name="group_id" invisible="1"/>
<field name="carrier_id"/>
<field name="backorder_id"/>
<field name="state"/>
<field name="weight"/>
<field name="priority" invisible="1"/>
<field name="picking_type_id" invisible="1"/>
</tree>
</field>
</record>
wizard.py
@api.multi
def shipping(self):
return {
'name' : _('Delivery Check'),
'views' : [(self.env.ref('shipping_carrier.picktree').id, 'tree')],
'view_mode': 'tree',
'type' : 'ir.actions.act_window',
'res_model': 'stock.picking',
'target' : 'new',
'domain' : [('state', '=', 'assigned'), ('min_date', '>=', self.date_start),
('min_date', '<=', self.date_end), ('carrier_id', '=', self.carrier_delivery_id.name)],
}
Inheritance in models and view: https://goo.gl/fGNfBY
hope this helps you.