summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorKevin Baptiste <kba@odoo.com>2019-07-31 13:39:40 +0000
committerKevin Baptiste <kba@odoo.com>2019-08-06 13:05:32 +0000
commitf23cc14d136f3c53cd8087d90fbe0a55fca22e52 (patch)
tree1c6cd342a0e4de82d7574656ab9afa0553379df7 /addons
parent7c5b4cbc03f2e62439a8af1928ccdca5f38316ca (diff)
[IMP] purchase: improve usability (back2basics)
TaskID: 2040826 closes odoo/odoo#35394 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/purchase/data/purchase_data.xml2
-rw-r--r--addons/purchase/views/purchase_views.xml14
-rw-r--r--addons/purchase_stock/views/stock_views.xml6
-rw-r--r--addons/uom/models/uom_uom.py10
-rw-r--r--addons/uom/views/uom_uom_views.xml38
5 files changed, 29 insertions, 41 deletions
diff --git a/addons/purchase/data/purchase_data.xml b/addons/purchase/data/purchase_data.xml
index 6fe3b76c656..d4360ef74d4 100644
--- a/addons/purchase/data/purchase_data.xml
+++ b/addons/purchase/data/purchase_data.xml
@@ -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>
diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml
index 30b6e4ba19f..85f009c0fff 100644
--- a/addons/purchase/views/purchase_views.xml
+++ b/addons/purchase/views/purchase_views.xml
@@ -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>
diff --git a/addons/purchase_stock/views/stock_views.xml b/addons/purchase_stock/views/stock_views.xml
index 7aa14df0afc..27cb6557a2f 100644
--- a/addons/purchase_stock/views/stock_views.xml
+++ b/addons/purchase_stock/views/stock_views.xml
@@ -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>
diff --git a/addons/uom/models/uom_uom.py b/addons/uom/models/uom_uom.py
index 49c6d88c224..beee90fbf43 100644
--- a/addons/uom/models/uom_uom.py
+++ b/addons/uom/models/uom_uom.py
@@ -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 = [
diff --git a/addons/uom/views/uom_uom_views.xml b/addons/uom/views/uom_uom_views.xml
index 9b198a4844e..83d89eae3d3 100644
--- a/addons/uom/views/uom_uom_views.xml
+++ b/addons/uom/views/uom_uom_views.xml
@@ -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>