[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>
This commit is contained in:
@@ -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"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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', '>', 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"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user