[IMP] purchase: improve usability (back2basics)
TaskID: 2040826 closes odoo/odoo#35394 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<record id="seq_purchase_order" model="ir.sequence">
|
||||
<field name="name">Purchase Order</field>
|
||||
<field name="code">purchase.order</field>
|
||||
<field name="prefix">PO</field>
|
||||
<field name="prefix">P</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
@@ -38,17 +38,6 @@
|
||||
action="uom.product_uom_form_action" id="menu_purchase_uom_form_action"
|
||||
parent="purchase.menu_product_in_config_purchase" sequence="5"/>
|
||||
|
||||
|
||||
<!-- Purchase Control Menu -->
|
||||
<menuitem id="menu_purchase_control" name="Control" parent="purchase.menu_purchase_root" sequence="4"/>
|
||||
|
||||
<!--Invoice control-->
|
||||
<menuitem
|
||||
id="menu_procurement_management_pending_invoice"
|
||||
action="account.action_move_in_invoice_type"
|
||||
parent="menu_purchase_control"
|
||||
sequence="13"/>
|
||||
|
||||
<!-- Products Control Menu -->
|
||||
<menuitem id="menu_purchase_products" name="Products" parent="purchase.menu_purchase_root" sequence="5"/>
|
||||
|
||||
@@ -348,9 +337,8 @@
|
||||
<group name="other_info">
|
||||
<field name="user_id"/>
|
||||
<field name="invoice_status"/>
|
||||
<field name="payment_term_id" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}"/>
|
||||
<field name="payment_term_id" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}" options="{'no_create': True}"/>
|
||||
<field name="fiscal_position_id" options="{'no_create': True}" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}"/>
|
||||
<field name="date_approve" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -32,10 +32,4 @@
|
||||
<field name="domain">[('purchase_id', '=', active_id)]</field>
|
||||
</record>
|
||||
|
||||
<!-- Inventory control -->
|
||||
<menuitem
|
||||
id="menu_action_picking_tree_in_move"
|
||||
action="stock.action_receipt_picking_move"
|
||||
parent="purchase.menu_purchase_control"
|
||||
sequence="11"/>
|
||||
</odoo>
|
||||
|
||||
@@ -11,11 +11,11 @@ class UoMCategory(models.Model):
|
||||
|
||||
name = fields.Char('Unit of Measure Category', required=True, translate=True)
|
||||
measure_type = fields.Selection([
|
||||
('unit', 'Units'),
|
||||
('weight', 'Weight'),
|
||||
('working_time', 'Working Time'),
|
||||
('length', 'Length'),
|
||||
('volume', 'Volume'),
|
||||
('unit', 'Default Units'),
|
||||
('weight', 'Default Weight'),
|
||||
('working_time', 'Default Working Time'),
|
||||
('length', 'Default Length'),
|
||||
('volume', 'Default Volume'),
|
||||
], string="Type of Measure")
|
||||
|
||||
_sql_constraints = [
|
||||
|
||||
@@ -23,20 +23,26 @@
|
||||
<field name="name"/>
|
||||
<field name="category_id"/>
|
||||
<field name="uom_type"/>
|
||||
<field name="factor"
|
||||
digits="[42,5]"
|
||||
attrs="{'invisible':[('uom_type','!=','smaller')],
|
||||
'readonly':[('uom_type','=','bigger')]}"/>
|
||||
<field name="factor_inv"
|
||||
digits="[42,5]"
|
||||
attrs="{'invisible':[('uom_type','!=','bigger')],
|
||||
'readonly':[('uom_type','!=','bigger')]}"/>
|
||||
<p attrs="{'invisible':[('uom_type','!=','smaller')]}" class="oe_grey" colspan="2">
|
||||
e.g: 1 * (reference unit) = ratio * (this unit)
|
||||
</p>
|
||||
<p attrs="{'invisible':[('uom_type','!=','bigger')]}" class="oe_grey" colspan="2">
|
||||
e.g: 1 * (this unit) = ratio * (reference unit)
|
||||
</p>
|
||||
<label for="factor"
|
||||
attrs="{'invisible':[('uom_type','!=','smaller')]}"/>
|
||||
<div attrs="{'invisible':[('uom_type','!=','smaller')]}" class="o_row">
|
||||
<field name="factor"
|
||||
digits="[42,5]"
|
||||
attrs="{'readonly':[('uom_type','=','bigger')]}"/>
|
||||
<span class="oe_grey">
|
||||
e.g: 1*(reference unit)=ratio*(this unit)
|
||||
</span>
|
||||
</div>
|
||||
<label for="factor_inv"
|
||||
attrs="{'invisible':[('uom_type','!=','bigger')]}"/>
|
||||
<div attrs="{'invisible':[('uom_type','!=','bigger')]}" class="o_row">
|
||||
<field name="factor_inv"
|
||||
digits="[42,5]"
|
||||
attrs="{'readonly':[('uom_type','!=','bigger')]}"/>
|
||||
<span class="oe_grey">
|
||||
e.g: 1*(this unit)=ratio*(reference unit)
|
||||
</span>
|
||||
</div>
|
||||
</group>
|
||||
<group name="active_rounding">
|
||||
<field name="active"/>
|
||||
@@ -83,13 +89,13 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Units of Measure categories" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="measure_type"/>
|
||||
<field name="measure_type" groups="base.group_no_one"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_uom_categ_form_action" model="ir.actions.act_window">
|
||||
<field name="name">Unit of Measure Categories</field>
|
||||
<field name="name">Units of Measure Categories</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">uom.category</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
||||
Reference in New Issue
Block a user