[IMP] buttons in forms, instead of related actions
bzr revid: fp@openerp.com-20130224112142-p9g0p7yg3hmq59eb
This commit is contained in:
commit
b90829f3ea
|
@ -68,6 +68,22 @@
|
|||
<field name="search_view_id" ref="view_account_analytic_default_form_search"/>
|
||||
<field name="context">{"search_default_current":1}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_product_default_list" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Defaults</field>
|
||||
<field name="res_model">account.analytic.default</field>
|
||||
<field name="context">{'search_default_product_id': [active_id], 'default_product_id': active_id}</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="product_form_view_default_analytic_button">
|
||||
<field name="name">product.product.stock.move</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button string="Analytic Rules" name= "%(action_product_default_list)d" type="action" groups="analytic.group_analytic_accounting" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
name="Entries"
|
||||
|
@ -99,13 +115,5 @@
|
|||
context="{'search_default_user_id': [active_id], 'default_user_id': active_id}"
|
||||
groups="analytic.group_analytic_accounting"/>
|
||||
|
||||
<act_window
|
||||
name="Analytic Rules"
|
||||
res_model="account.analytic.default"
|
||||
id="analytic_rule_action_product"
|
||||
src_model="product.product"
|
||||
context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
|
||||
groups="analytic.group_analytic_accounting"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -980,26 +980,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_product_id': [active_id]}"
|
||||
id="act_product_manufacturing_open"
|
||||
name="Manufacturing Orders"
|
||||
view_id="mrp_production_tree_view"
|
||||
res_model="mrp.production"
|
||||
src_model="product.product"/>
|
||||
|
||||
<act_window
|
||||
id="action_product_bom_structure"
|
||||
name="Product BoM Structure"
|
||||
domain="[('product_id', 'in', active_ids),('bom_id','=',False)]"
|
||||
context="{'default_product_id': active_id}"
|
||||
view_type="tree"
|
||||
view_mode="tree"
|
||||
view_id="mrp_bom_tree_view"
|
||||
res_model="mrp.bom"
|
||||
src_model="product.product"
|
||||
groups="mrp.group_mrp_user"/>
|
||||
|
||||
<!-- Menu for Resource for MRP-->
|
||||
|
||||
<record id="mrp_workcenter_action" model="ir.actions.act_window">
|
||||
|
@ -1034,21 +1014,33 @@
|
|||
id="menu_mrp_production_order_action" name="Order Planning"
|
||||
parent="menu_mrp_planning" sequence="1"/>
|
||||
|
||||
|
||||
<record id="act_product_mrp_bom_open" model="ir.actions.act_window">
|
||||
<field name="name">BoM Structure</field>
|
||||
<field name="context">{'default_product_id': active_id}</field>
|
||||
<field name="domain">[('product_id', 'in', active_ids),('bom_id','=',False)]</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="product_open_bom">
|
||||
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
|
||||
<field name="name">Bill of Materials</field>
|
||||
<field name="domain">[('bom_id','=',False)]</field>
|
||||
<field name="res_model">mrp.bom</field>
|
||||
</record>
|
||||
|
||||
<record id="act_product_mrp_production" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_product_id': [active_id]}</field>
|
||||
<field name="name">Manufacturing Orders</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_id" ref="mrp_production_tree_view"/>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="product_form_view_bom_button">
|
||||
<field name="name">product.product.procurement</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button string="Bill of Materials" name="%(product_open_bom)d" type="action"/>
|
||||
<button string="Bill of Materials" name="%(product_open_bom)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}"/>
|
||||
<button string="BoM Structure" name="%(act_product_mrp_bom_open)d" type="action" groups="mrp.group_mrp_user" attrs="{'invisible':[('type', '=', 'service')]}"/>
|
||||
<button string="Manufacturing Orders" name="%(act_product_mrp_production)d" type="action" groups="mrp.group_mrp_user" attrs="{'invisible':[('type', '=', 'service')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -312,11 +312,13 @@
|
|||
<record model="ir.ui.view" id="product_form_view_procurement_button">
|
||||
<field name="name">product.product.procurement</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='incoming_qty']" position="after">
|
||||
<button string="⇒ Request Procurement" name="%(act_make_procurement)d" type="action" class="oe_link"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button string="Request Procurement" name="%(act_make_procurement)d" type="action"/>
|
||||
<button string="Orderpoints" name="%(product_open_orderpoint)d" type="action"/>
|
||||
<button string="Orderpoints" name="%(product_open_orderpoint)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='cost_method']" position="before">
|
||||
<field name="procure_method" groups="base.group_user"/>
|
||||
|
|
|
@ -492,15 +492,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_product_id': [active_id], 'default_product_id': active_id}"
|
||||
id="action_purchase_line_product_tree"
|
||||
name="Purchases"
|
||||
res_model="purchase.order.line"
|
||||
src_model="product.product"
|
||||
groups="purchase.group_purchase_user"/>
|
||||
|
||||
|
||||
<record id="purchase_line_form_action2" model="ir.actions.act_window">
|
||||
<field name="name">On Purchase Order Lines</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -613,12 +604,20 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_purchase_line_product_tree">
|
||||
<field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
|
||||
<field name="name">Purchases</field>
|
||||
<field name="res_model">purchase.order.line</field>
|
||||
<field name="view_id" ref="purchase_order_line_tree"/>
|
||||
</record>
|
||||
<record id="view_product_account_purchase_ok_form" model="ir.ui.view">
|
||||
<field name="name">product.account.purchase.ok.form.inherit</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="account.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button string="Purchases" name="%(action_purchase_line_product_tree)d" type="action" groups="purchase.group_purchase_user"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='property_account_expense']" position="replace" >
|
||||
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" groups="account.group_account_user"/>
|
||||
</xpath>
|
||||
|
@ -627,6 +626,5 @@
|
|||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -538,15 +538,22 @@
|
|||
<field name="domain">[('invoiced','<>', 1),('state','=','done')]</field>
|
||||
<field name="filter" eval="True"/>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_product_id': active_id, 'default_product_id': active_id}"
|
||||
id="action_order_line_product_tree"
|
||||
name="Sales Order Lines"
|
||||
res_model="sale.order.line"
|
||||
src_model="product.product"
|
||||
groups="base.group_sale_salesman"/>
|
||||
|
||||
<record id="action_order_line_product_tree" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
|
||||
<field name="name">Sales Order Lines</field>
|
||||
<field name="res_model">sale.order.line</field>
|
||||
<field name="view_id" ref="view_order_line_tree"/>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="product_form_view_sale_order_button">
|
||||
<field name="name">product.product.sale.order</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button string="Sales" name="%(action_order_line_product_tree)d" type="action" groups="base.group_sale_salesman"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>
|
||||
<menuitem id="menu_invoicing_sales_order_lines" parent="base.menu_invoiced" action="action_order_line_tree2" sequence="10" groups="sale.group_invoice_so_lines"/>
|
||||
|
||||
|
|
|
@ -68,6 +68,10 @@
|
|||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button string="Inventory" name="%(action_product_location_tree)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations"/>
|
||||
<button string="Moves" name= "%(act_product_stock_move_open)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_stock_user"/>
|
||||
</xpath>
|
||||
<group name="procurement_uom" position="before">
|
||||
<group name="delay" string="Delays">
|
||||
<label for="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
|
||||
|
@ -88,13 +92,16 @@
|
|||
<label for="qty_available"/>
|
||||
<div>
|
||||
<field name="qty_available" class="oe_inline"/>
|
||||
<button name="%(action_view_change_product_quantity)d" string="update"
|
||||
type="action"
|
||||
class="oe_link"/>
|
||||
<button name="%(action_view_change_product_quantity)d" string="⇒ Update"
|
||||
type="action"
|
||||
class="oe_link"/>
|
||||
</div>
|
||||
<label for="incoming_qty"/>
|
||||
<div>
|
||||
<field name="incoming_qty" class="oe_inline"/>
|
||||
<field name="outgoing_qty" class="oe_inline"/>
|
||||
<field name="virtual_available" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="outgoing_qty" class="oe_inline"/>
|
||||
<field name="virtual_available" class="oe_inline"/>
|
||||
</group>
|
||||
<group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
|
||||
<field name="track_production" groups="stock.group_production_lot"/>
|
||||
|
|
|
@ -2,13 +2,6 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<act_window
|
||||
context="{'product_id': active_id}"
|
||||
id="act_stock_product_location_open"
|
||||
name="Stock by Location"
|
||||
res_model="stock.location"
|
||||
src_model="product.product"/>
|
||||
|
||||
<act_window
|
||||
domain="[('tracking_id', '=', active_id)]"
|
||||
id="act_stock_tracking_lot_2_stock_report_tracklots"
|
||||
|
|
|
@ -632,6 +632,16 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_product_location_tree">
|
||||
<field name="context">{'product_id': active_id}</field>
|
||||
<field name="name">Stock by Location</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
</record>
|
||||
<record id="act_product_stock_move_open" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_done': 1,'search_default_product_id': active_id, 'default_product_id': active_id}</field>
|
||||
<field name="name">Moves</field>
|
||||
<field name="res_model">stock.move</field>
|
||||
</record>
|
||||
<record id="action_location_tree" model="ir.actions.act_window">
|
||||
<field name="name">Location Structure</field>
|
||||
<field name="res_model">stock.location</field>
|
||||
|
@ -1562,21 +1572,6 @@
|
|||
res_model="product.product"
|
||||
src_model="stock.location"/>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_done': 1,'search_default_product_id': [active_id], 'default_product_id': active_id}"
|
||||
id="act_product_stock_move_open"
|
||||
name="Inventory Move"
|
||||
res_model="stock.move"
|
||||
src_model="product.product"/>
|
||||
|
||||
<act_window
|
||||
context="{'search_default_future': 1,'search_default_product_id': [active_id], 'default_product_id': active_id}"
|
||||
domain="[('state','in',('waiting','confirmed','assigned'))]"
|
||||
id="act_product_stock_move_futur_open"
|
||||
name="Future Stock Moves"
|
||||
res_model="stock.move"
|
||||
src_model="product.product"/>
|
||||
|
||||
<record id="ir_act_product_location_open" model="ir.values">
|
||||
<field name="key2">tree_but_open</field>
|
||||
<field name="model">stock.location</field>
|
||||
|
|
Loading…
Reference in New Issue