summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasa-odoo <asa@odoo.com>2019-03-14 13:29:35 +0000
committerasa-odoo <asa@odoo.com>2019-04-04 09:38:18 +0000
commitfb2fc0b3d8907f9fbf01834c2db3287668873fff (patch)
treee691cb5feb0874403403b970b0591c03b4ba4f8a
parent44a5460d433900ac0bc77d77221f311a1deaf14e (diff)
[IMP] sale, account, purchase, repair, POS, delivery: shorter fields label
In described Modules, there are some fields label like Unit of measure, Discount, Ordered Quantity, etc... in views(list,form), report and portal, that are messy and barely readable when lots of features are installed. Purpose of the task is to shorter that all fields label to make clean view in order to make it more readable without getting labels uselessly spread out on several lines Related to task #1933746 Closes #31962 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
-rw-r--r--addons/account/views/account_invoice_view.xml8
-rw-r--r--addons/account/views/report_invoice.xml2
-rw-r--r--addons/delivery/models/sale_order.py2
-rw-r--r--addons/point_of_sale/views/pos_order_view.xml2
-rw-r--r--addons/purchase/views/purchase_views.xml6
-rw-r--r--addons/purchase_requisition/views/purchase_requisition_views.xml2
-rw-r--r--addons/repair/views/repair_views.xml2
-rw-r--r--addons/sale/models/sale.py2
-rw-r--r--addons/sale/report/sale_report_templates.xml2
-rw-r--r--addons/sale/views/sale_portal_templates.xml2
-rw-r--r--addons/sale/views/sale_views.xml12
-rw-r--r--addons/sale_management/views/sale_order_views.xml4
12 files changed, 24 insertions, 22 deletions
diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml
index 634ee330c9d..0e62eabcf8b 100644
--- a/addons/account/views/account_invoice_view.xml
+++ b/addons/account/views/account_invoice_view.xml
@@ -336,9 +336,9 @@
context="{'default_partner_id': parent.partner_id}"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="quantity"/>
- <field name="uom_id" groups="uom.group_uom"/>
+ <field name="uom_id" string="UoM" groups="uom.group_uom"/>
<field name="price_unit"/>
- <field name="discount" groups="base.group_no_one"/>
+ <field name="discount" string="Disc.%" groups="base.group_no_one"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
domain="[('type_tax_use','=','purchase'),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal" string="Amount"/>
@@ -512,9 +512,9 @@
context="{'default_partner_id': parent.partner_id}"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="quantity"/>
- <field name="uom_id" groups="uom.group_uom"/>
+ <field name="uom_id" string="UoM" groups="uom.group_uom"/>
<field name="price_unit" string="Price"/>
- <field name="discount" groups="base.group_no_one" string="Disc (%)"/>
+ <field name="discount" groups="base.group_no_one" string="Disc.%"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
domain="[('type_tax_use','=','sale'),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal" string="Subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml
index 1c57b6892c9..77aba90eaf2 100644
--- a/addons/account/views/report_invoice.xml
+++ b/addons/account/views/report_invoice.xml
@@ -56,7 +56,7 @@
<th class="text-right"><span>Quantity</span></th>
<th t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Unit Price</span></th>
<th t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
- <span>Disc.(%)</span>
+ <span>Disc.%</span>
</th>
<th t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Taxes</span></th>
<th class="text-right" groups="account.group_show_line_subtotals_tax_excluded">Amount</th>
diff --git a/addons/delivery/models/sale_order.py b/addons/delivery/models/sale_order.py
index cd09c8490ab..8fdfa66ac16 100644
--- a/addons/delivery/models/sale_order.py
+++ b/addons/delivery/models/sale_order.py
@@ -135,7 +135,7 @@ class SaleOrderLine(models.Model):
_inherit = 'sale.order.line'
is_delivery = fields.Boolean(string="Is a Delivery", default=False)
- product_qty = fields.Float(compute='_compute_product_qty', string='Quantity', digits=dp.get_precision('Product Unit of Measure'))
+ product_qty = fields.Float(compute='_compute_product_qty', string='Product Qty', digits=dp.get_precision('Product Unit of Measure'))
recompute_delivery_price = fields.Boolean(related='order_id.recompute_delivery_price')
@api.depends('product_id', 'product_uom', 'product_uom_qty')
diff --git a/addons/point_of_sale/views/pos_order_view.xml b/addons/point_of_sale/views/pos_order_view.xml
index 6bccce47ce5..0bc95027faa 100644
--- a/addons/point_of_sale/views/pos_order_view.xml
+++ b/addons/point_of_sale/views/pos_order_view.xml
@@ -39,7 +39,7 @@
<field name="product_id"/>
<field name="qty"/>
<field name="price_unit" widget="monetary"/>
- <field name="discount" widget="monetary"/>
+ <field name="discount" string="Disc.%" widget="monetary"/>
<field name="tax_ids_after_fiscal_position" widget="many2many_tags" string="Taxes"/>
<field name="tax_ids" widget="many2many_tags" invisible="1"/>
<field name="price_subtotal" widget="monetary" force_save="1"/>
diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml
index 8711cc7a520..8c9492714f0 100644
--- a/addons/purchase/views/purchase_views.xml
+++ b/addons/purchase/views/purchase_views.xml
@@ -197,9 +197,9 @@
<field name="product_qty"/>
<field name="qty_received_manual" invisible="1"/>
<field name="qty_received_method" invisible="1"/>
- <field name="qty_received" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))], 'readonly': [('qty_received_method', '!=', 'manual')]}"/>
- <field name="qty_invoiced" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))]}"/>
- <field name="product_uom" groups="uom.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}" force_save="1"/>
+ <field name="qty_received" string="Received" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))], 'readonly': [('qty_received_method', '!=', 'manual')]}"/>
+ <field name="qty_invoiced" string="Billed" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))]}"/>
+ <field name="product_uom" string="UoM" groups="uom.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}" force_save="1"/>
<field name="price_unit"/>
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase', 'search_view_ref': 'account.account_tax_view_search'}" options="{'no_create': True}"/>
<field name="price_subtotal" widget="monetary"/>
diff --git a/addons/purchase_requisition/views/purchase_requisition_views.xml b/addons/purchase_requisition/views/purchase_requisition_views.xml
index 18b5a82dd3d..2b23468566c 100644
--- a/addons/purchase_requisition/views/purchase_requisition_views.xml
+++ b/addons/purchase_requisition/views/purchase_requisition_views.xml
@@ -161,7 +161,7 @@
<field name="product_id"/>
<field name="product_qty"/>
<field name="qty_ordered"/>
- <field name="product_uom_id" groups="uom.group_uom"/>
+ <field name="product_uom_id" string="UoM" groups="uom.group_uom"/>
<field name="schedule_date" groups="base.group_no_one"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
diff --git a/addons/repair/views/repair_views.xml b/addons/repair/views/repair_views.xml
index f96f4e472c2..3a6b14c9832 100644
--- a/addons/repair/views/repair_views.xml
+++ b/addons/repair/views/repair_views.xml
@@ -114,7 +114,7 @@
<field name="location_id" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
<field name="product_uom_qty" string="Quantity"/>
- <field name="product_uom" string="Unit of Measure" groups="uom.group_uom"/>
+ <field name="product_uom" string="UoM" groups="uom.group_uom"/>
<field name="price_unit"/>
<field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale')]"/>
<field name="price_subtotal" widget="monetary"/>
diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py
index 99258e80233..ad1362bd58d 100644
--- a/addons/sale/models/sale.py
+++ b/addons/sale/models/sale.py
@@ -1121,7 +1121,7 @@ class SaleOrderLine(models.Model):
product_id = fields.Many2one('product.product', string='Product', domain=[('sale_ok', '=', True)], change_default=True, ondelete='restrict')
product_updatable = fields.Boolean(compute='_compute_product_updatable', string='Can Edit Product', readonly=True, default=True)
- product_uom_qty = fields.Float(string='Ordered Quantity', digits=dp.get_precision('Product Unit of Measure'), required=True, default=1.0)
+ product_uom_qty = fields.Float(string='Quantity', digits=dp.get_precision('Product Unit of Measure'), required=True, default=1.0)
product_uom = fields.Many2one('uom.uom', string='Unit of Measure')
product_custom_attribute_value_ids = fields.One2many('product.attribute.custom.value', 'sale_order_line_id', string='User entered custom product attribute values')
diff --git a/addons/sale/report/sale_report_templates.xml b/addons/sale/report/sale_report_templates.xml
index 28a5d105dfc..f5aee8c92d8 100644
--- a/addons/sale/report/sale_report_templates.xml
+++ b/addons/sale/report/sale_report_templates.xml
@@ -74,7 +74,7 @@
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
- <span>Disc.(%)</span>
+ <span>Disc.%</span>
</th>
<th class="text-right">Taxes</th>
<th class="text-right" groups="account.group_show_line_subtotals_tax_excluded">Amount</th>
diff --git a/addons/sale/views/sale_portal_templates.xml b/addons/sale/views/sale_portal_templates.xml
index 2e43b590490..32b2a06b451 100644
--- a/addons/sale/views/sale_portal_templates.xml
+++ b/addons/sale/views/sale_portal_templates.xml
@@ -428,7 +428,7 @@
<th class="text-right">Quantity</th>
<th t-attf-class="text-right {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}">Unit Price</th>
<th t-if="display_discount" t-attf-class="text-right {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}">
- <span>Discount</span>
+ <span>Disc.%</span>
</th>
<th t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">Taxes</th>
<th class="text-right" groups="account.group_show_line_subtotals_tax_excluded">Amount</th>
diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml
index 0a5df73d185..0d4f50435a6 100644
--- a/addons/sale/views/sale_views.xml
+++ b/addons/sale/views/sale_views.xml
@@ -312,7 +312,7 @@
<field name="price_total" invisible="1"/>
<field name="price_tax" invisible="1"/>
<field name="price_subtotal" invisible="1"/>
- <label for="product_uom_qty" string="Ordered Quantity"/>
+ <label for="product_uom_qty"/>
<div>
<field
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'uom_qty_change':True, 'company_id': parent.company_id}"
@@ -328,11 +328,11 @@
}"
/>
</div>
- <label for="qty_delivered" string="Delivered Quantity" attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}"/>
+ <label for="qty_delivered" string="Delivered" attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}"/>
<div attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}">
<field name="qty_delivered" attrs="{'readonly': [('qty_delivered_method', '!=', 'manual')]}"/>
</div>
- <label for="qty_invoiced" string="Invoiced Quantity" attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}"/>
+ <label for="qty_invoiced" string="Invoiced" attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}"/>
<div attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}">
<field name="qty_invoiced" attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}"/>
</div>
@@ -408,7 +408,6 @@
<field name="name" widget="section_and_note_text"/>
<field
name="product_uom_qty"
- string="Ordered Qty"
context="{
'partner_id': parent.partner_id,
'quantity': product_uom_qty,
@@ -419,6 +418,7 @@
/>
<field
name="qty_delivered"
+ string="Delivered"
attrs="{
'column_invisible': [('parent.state', 'not in', ['sale', 'done'])],
'readonly': [('qty_delivered_method', '!=', 'manual')]
@@ -428,12 +428,14 @@
<field name="qty_delivered_method" invisible="1"/>
<field
name="qty_invoiced"
+ string="Invoiced"
attrs="{'column_invisible': [('parent.state', 'not in', ['sale', 'done'])]}"
/>
<field name="qty_to_invoice" invisible="1"/>
<field
name="product_uom"
force_save="1"
+ string="UoM"
attrs="{
'readonly': [('state', 'in', ('sale','done', 'cancel'))],
'required': [('display_type', '=', False)],
@@ -459,7 +461,7 @@
domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"
/>
- <field name="discount" groups="sale.group_discount_per_so_line"/>
+ <field name="discount" string="Disc.%" groups="sale.group_discount_per_so_line"/>
<field name="price_subtotal" widget="monetary" groups="account.group_show_line_subtotals_tax_excluded"/>
<field name="price_total" widget="monetary" groups="account.group_show_line_subtotals_tax_included"/>
<field name="state" invisible="1"/>
diff --git a/addons/sale_management/views/sale_order_views.xml b/addons/sale_management/views/sale_order_views.xml
index f18f8a429c4..6ecd09c2fca 100644
--- a/addons/sale_management/views/sale_order_views.xml
+++ b/addons/sale_management/views/sale_order_views.xml
@@ -68,9 +68,9 @@
<field name="product_id"/>
<field name="name"/>
<field name="quantity"/>
- <field name="uom_id" groups="uom.group_uom"/>
+ <field name="uom_id" string="UoM" groups="uom.group_uom"/>
<field name="price_unit"/>
- <field name="discount" groups="sale.group_discount_per_so_line"/>
+ <field name="discount" string="Disc.%" groups="sale.group_discount_per_so_line"/>
<button name="button_add_to_order" class="oe_link" icon="fa-shopping-cart" string="Add to order lines" type="object"/>
</tree>
</field>