I have created a new model and defined a tree, calendar and form view. When I select multiple records in treeview, I can't see a 'delete' button (I am unable to post screenshot due to insufficient rights)
Here is the model:
class GearManufacturing(models.Model):
_name = 'gear.manufacturing'
product_id = fields.Many2one("product.product", string='Product',required=True)
product_model = fields.Char("Product Model", related='product_id.x_product_model')
product_to_dispatch = fields.Integer('Products to Dispatch',required=True)
dispatch_date = fields.Date('Dispatch Date', copy=False, default=fields.Date.today(), index=True, required=True)
dispatch_date_month = fields.Char(string='Dispatch Date Month',compute='_get_date_month',store=True,readonly=True)
dispatch_date_year = fields.Char(string='Dispatch Date Year',compute='_get_date_year',store=True,readonly=True)
Here is the view:
<odoo>
<data>
<record id="gear_manufacturing_tree" model="ir.ui.view">
<field name="name">gear.manufacturing.tree</field>
<field name="model">gear.manufacturing</field>
<field name="arch" type="xml">
<tree>
<field name="product_id"/>
<field name="product_to_dispatch"/>
<field name="product_model"/>
<field name="dispatch_date"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="dispatch_plan_calendar">
<field name="name">Dispatch Plan</field>
<field name="model">gear.manufacturing</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="dispatch_date">
<field name="product_id"/>
<field name="product_model"/>
<field name="product_to_dispatch"/>
</calendar>
</field>
</record>
<record model="ir.actions.act_window" id="gear_manufacturing_action">
<field name="name">Dispatch Plan</field>
<field name="res_model">gear.manufacturing</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">calendar,tree,form</field>
</record>
</odoo>
Where am I going wrong?
Add Access Rights: https://goo.gl/4jAhtH