Add and improve views for usability purposes
This commit is contained in:
@@ -180,4 +180,32 @@
|
|||||||
|
|
||||||
<!-- The menu entry should be added in customer-specific module -->
|
<!-- The menu entry should be added in customer-specific module -->
|
||||||
|
|
||||||
|
<!-- in v10, the cart button is present on the product.template form view
|
||||||
|
but not on the product.product form view
|
||||||
|
In v8, it was present on both, so I put the cart button on the product.product form view too -->
|
||||||
|
<record id="action_purchase_line_product_product_tree" model="ir.actions.act_window">
|
||||||
|
<field name="name">Purchase Order Lines</field>
|
||||||
|
<field name="res_model">purchase.order.line</field>
|
||||||
|
<field name="view_id" ref="purchase_order_line_tree"/>
|
||||||
|
<field name="domain">[('product_id','in',active_ids), ('state', 'in', ['purchase', 'done'])]</field>
|
||||||
|
<field name="context">{}</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_product_normal_purchase_buttons_from" model="ir.ui.view">
|
||||||
|
<field name="name">product.product.purchase.button.inherit</field>
|
||||||
|
<field name="model">product.product</field>
|
||||||
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||||
|
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<div name="button_box" position="inside">
|
||||||
|
<button class="oe_inline oe_stat_button"
|
||||||
|
name="%(action_purchase_line_product_product_tree)d"
|
||||||
|
type="action" icon="fa-shopping-cart">
|
||||||
|
<field string="Purchases" name="purchase_count" widget="statinfo"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -122,6 +122,9 @@
|
|||||||
states="confirmed,assigned"/>
|
states="confirmed,assigned"/>
|
||||||
</button>
|
</button>
|
||||||
-->
|
-->
|
||||||
|
<field name="picking_id" position="after">
|
||||||
|
<field name="inventory_id" readonly="1"/>
|
||||||
|
</field>
|
||||||
<group name="moved_quants_grp" position="after">
|
<group name="moved_quants_grp" position="after">
|
||||||
<notebook colspan="2">
|
<notebook colspan="2">
|
||||||
<page string="Notes" name="notes">
|
<page string="Notes" name="notes">
|
||||||
@@ -133,8 +136,10 @@
|
|||||||
<field name="route_ids" widget="many2many_tags"/>
|
<field name="route_ids" widget="many2many_tags"/>
|
||||||
<field name="rule_id" readonly="1"/>
|
<field name="rule_id" readonly="1"/>
|
||||||
<field name="push_rule_id" readonly="1"/>
|
<field name="push_rule_id" readonly="1"/>
|
||||||
|
<field name="propagate" readonly="1"/>
|
||||||
<field name="price_unit"
|
<field name="price_unit"
|
||||||
attrs="{'readonly': [('state', '=', 'done')]}"/>
|
attrs="{'readonly': [('state', '=', 'done')]}"/>
|
||||||
|
<field name="reserved_quant_ids" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
@@ -161,7 +166,9 @@
|
|||||||
<field name="route_ids" widget="many2many_tags"/>
|
<field name="route_ids" widget="many2many_tags"/>
|
||||||
<field name="rule_id" readonly="1"/>
|
<field name="rule_id" readonly="1"/>
|
||||||
<field name="push_rule_id" readonly="1"/>
|
<field name="push_rule_id" readonly="1"/>
|
||||||
|
<field name="propagate" readonly="1"/>
|
||||||
<field name="price_unit" readonly="1"/>
|
<field name="price_unit" readonly="1"/>
|
||||||
|
<field name="reserved_quant_ids" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
@@ -311,14 +318,14 @@ should be able to access it. So I add a menu entry under Inventory Control. -->
|
|||||||
but it forces a group by on products that you can't remove
|
but it forces a group by on products that you can't remove
|
||||||
So I create another "regular" Quants" menu entry -->
|
So I create another "regular" Quants" menu entry -->
|
||||||
<record id="stock_quant_action" model="ir.actions.act_window">
|
<record id="stock_quant_action" model="ir.actions.act_window">
|
||||||
<field name="name">Quants</field>
|
<field name="name">Quants List</field>
|
||||||
<field name="res_model">stock.quant</field>
|
<field name="res_model">stock.quant</field>
|
||||||
<field name="view_mode">tree,form,pivot</field>
|
<field name="view_mode">tree,form,pivot</field>
|
||||||
<field name="context">{'search_default_internal_loc': 1}</field>
|
<field name="context">{'search_default_internal_loc': 1}</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem id="stock_quant_menu" action="stock_quant_action"
|
<menuitem id="stock_quant_menu" action="stock_quant_action"
|
||||||
parent="stock.menu_warehouse_report" groups="stock.group_stock_manager"
|
parent="stock.menu_warehouse_report"
|
||||||
sequence="135"/>
|
sequence="135"/>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user