diff options
27 files changed, 144 insertions, 115 deletions
diff --git a/addons/account/views/product_view.xml b/addons/account/views/product_view.xml index 5dc56426ed3..2cc9b5a67b6 100644 --- a/addons/account/views/product_view.xml +++ b/addons/account/views/product_view.xml @@ -7,23 +7,24 @@ <field name="priority">5</field> <field name="inherit_id" ref="product.product_template_form_view"/> <field name="arch" type="xml"> - <page name="sales" position="after"> - <page string="Invoicing" name="invoicing" groups="account.group_account_invoice"> + <page name="inventory" position="after"> + <page string="Invoicing" name="invoicing"> <group name="properties"> - <group> + <group string="Receivables"> + <field name="taxes_id" widget="many2many_tags"/> <field name="property_account_income_id" domain="[('internal_type','=','other'),('deprecated','=',False)]" groups="account.group_account_user"/> - <field name="taxes_id" widget="many2many_tags"/> </group> - <group> + <group string="Payables" name="payables"> + <field name="supplier_taxes_id" widget="many2many_tags"/> <field name="property_account_expense_id" domain="[('internal_type','=','other'),('deprecated','=',False)]" groups="account.group_account_user"/> - <field name="supplier_taxes_id" widget="many2many_tags"/> </group> </group> <group name="accounting"/> + <group name="invoicing"/> </page> </page> </field> diff --git a/addons/account_asset/views/product_views.xml b/addons/account_asset/views/product_views.xml index 57f8c00c27a..d58c8ae31a0 100644 --- a/addons/account_asset/views/product_views.xml +++ b/addons/account_asset/views/product_views.xml @@ -6,10 +6,11 @@ <field name="model">product.template</field> <field name="inherit_id" ref="account.product_template_form_view"/> <field name="arch" type="xml"> - <field name="property_account_expense_id" position="before"> + <field name="property_account_expense_id" position="after"> <field name="asset_category_id" domain="[('type', '=', 'purchase')]" - context="{'default_type': 'purchase'}"/> + context="{'default_type': 'purchase'}" + groups="account.group_account_user"/> </field> </field> </record> diff --git a/addons/delivery/views/product_template_view.xml b/addons/delivery/views/product_template_view.xml index 45256f3aac5..9073377f826 100644 --- a/addons/delivery/views/product_template_view.xml +++ b/addons/delivery/views/product_template_view.xml @@ -6,7 +6,7 @@ <field name="model">product.template</field> <field name="inherit_id" ref="product.product_template_form_view"/> <field name="arch" type="xml"> - <field name="type" position="after"> + <field name="categ_id" position="after"> <field name="hs_code"/> </field> </field> diff --git a/addons/event_sale/models/product.py b/addons/event_sale/models/product.py index 67fade67f6b..fb03a5b250b 100644 --- a/addons/event_sale/models/product.py +++ b/addons/event_sale/models/product.py @@ -6,7 +6,7 @@ from odoo import api, fields, models class ProductTemplate(models.Model): _inherit = 'product.template' - event_ok = fields.Boolean(string='Event Registration', help='Determine if a product needs ' + event_ok = fields.Boolean(string='Is an Event Ticket', help='Determine if a product needs ' 'to create automatically an event registration at the confirmation of a sales order line.') @api.onchange('event_ok') diff --git a/addons/event_sale/views/product_views.xml b/addons/event_sale/views/product_views.xml index 90eeb481b4b..52d43f67b6d 100644 --- a/addons/event_sale/views/product_views.xml +++ b/addons/event_sale/views/product_views.xml @@ -3,11 +3,13 @@ <record id="event_sale_product_template_form" model="ir.ui.view"> <field name="name">product.template.event.form.inherit</field> <field name="model">product.template</field> - <field name="inherit_id" ref="sale.product_template_form_view_invoice_policy" /> + <field name="inherit_id" ref="product.product_template_form_view" /> <field name="arch" type="xml"> - <field name="invoice_policy" position="before"> - <field name="event_ok" /> - </field> + <group name="email_template_and_project" position="after"> + <group string="Events"> + <field name="event_ok" /> + </group> + </group> </field> </record> </odoo> diff --git a/addons/point_of_sale/models/product.py b/addons/point_of_sale/models/product.py index 4e350eed91c..6bae7c2d464 100644 --- a/addons/point_of_sale/models/product.py +++ b/addons/point_of_sale/models/product.py @@ -7,7 +7,7 @@ from odoo.exceptions import UserError class ProductTemplate(models.Model): _inherit = 'product.template' - available_in_pos = fields.Boolean(string='Available in the Point of Sale', help='Check if you want this product to appear in the Point of Sale', default=True) + available_in_pos = fields.Boolean(string='Available in Point of Sale', help='Check if you want this product to appear in the Point of Sale', default=True) to_weight = fields.Boolean(string='To Weigh With Scale', help="Check if the product should be weighted using the hardware scale integration") pos_categ_id = fields.Many2one( 'pos.category', string='Point of Sale Category', diff --git a/addons/point_of_sale/views/product_view.xml b/addons/point_of_sale/views/product_view.xml index 8c06471cc32..ced1a008238 100644 --- a/addons/point_of_sale/views/product_view.xml +++ b/addons/point_of_sale/views/product_view.xml @@ -57,7 +57,7 @@ <field name="model">product.template</field> <field name="inherit_id" ref="stock.view_template_property_form"/> <field name="arch" type="xml"> - <group name="sale_condition" position="after"> + <group name="email_template_and_project" position="before"> <group name="pos" string="Point of Sale"> <field name="available_in_pos"/> <field name="pos_categ_id" attrs="{'invisible': [('available_in_pos', '=', False)]}"/> diff --git a/addons/procurement/views/product_views.xml b/addons/procurement/views/product_views.xml index 9e4e0567846..a85607c29fd 100644 --- a/addons/procurement/views/product_views.xml +++ b/addons/procurement/views/product_views.xml @@ -10,7 +10,7 @@ <xpath expr="//button[@name='toggle_active']" position="before"> <button class="oe_stat_button" name="%(procurement.procurement_order_action_product_template_stat)d" icon="fa-truck" string="Procurements" type="action" - groups="base.group_no_one" + groups="stock.group_adv_location" attrs="{'invisible':[('type', '=', 'service')]}"/> </xpath> </field> diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index d8a48b88801..ceb15d85e27 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -61,7 +61,7 @@ class ProductTemplate(models.Model): 'Price', compute='_compute_template_price', inverse='_set_template_price', digits=dp.get_precision('Product Price')) list_price = fields.Float( - 'Sale Price', default=1.0, + 'Sales Price', default=1.0, digits=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price.") lst_price = fields.Float( @@ -81,7 +81,6 @@ class ProductTemplate(models.Model): inverse='_set_weight', store=True, help="The weight of the contents in Kg, not including any packaging, etc.") - warranty = fields.Float('Warranty') sale_ok = fields.Boolean( 'Can be Sold', default=True, help="Specify if the product can be selected in a sales order line.") diff --git a/addons/product/views/product_template_views.xml b/addons/product/views/product_template_views.xml index 3425c1ec458..f3316c537d9 100644 --- a/addons/product/views/product_template_views.xml +++ b/addons/product/views/product_template_views.xml @@ -28,7 +28,7 @@ <xpath expr="//form" position="attributes"> <attribute name="name">Product Template</attribute> </xpath> - <field name="type" position="after"> + <field name="categ_id" position="after"> <field name="default_code" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/> <field name="barcode" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/> </field> @@ -42,7 +42,7 @@ </button> </button> - <xpath expr="//page[@name='sales']" position="after"> + <xpath expr="//page[@name='general_information']" position="after"> <page name="variants" string="Variants" groups="product.group_product_variant"> <field name="attribute_line_ids" widget="one2many_list" context="{'show_attribute': False}"> <tree string="Variants" editable="bottom"> diff --git a/addons/product/views/product_views.xml b/addons/product/views/product_views.xml index 042bbcc4359..c62732aa306 100644 --- a/addons/product/views/product_views.xml +++ b/addons/product/views/product_views.xml @@ -50,7 +50,7 @@ <field name="list_price" widget='monetary' options="{'currency_field': 'currency_id'}"/> <label for="standard_price" groups="base.group_user"/> <div name="standard_price_uom" groups="base.group_user"> - <field name="standard_price" widget='monetary' options="{'currency_field': 'currency_id'}" class="oe_inline"/> + <field name="standard_price" widget='monetary' options="{'currency_field': 'currency_id'}"/> </div> <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/> @@ -61,14 +61,6 @@ </group> </group> </page> - <page string="Inventory" name="inventory" groups="stock.group_stock_user,product.group_stock_packaging"> - <group name="packaging" string="Packaging" - colspan="4" - attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}" - groups="product.group_stock_packaging"> - <field name="packaging_ids" nolabel="1" context="{'default_product_id': product_variant_id,'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}"/> - </group> - </page> <page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}" name="sales"> <div name="pricelist_item" groups="product.group_product_pricelist"> <separator string="Pricing"/> @@ -88,13 +80,24 @@ attrs="{'invisible':[('type', '!=', 'service')]}"/> </group> </page> + <page string="Inventory" name="inventory" groups="stock.group_stock_user,product.group_stock_packaging" attrs="{'invisible':[('type', '=', 'service')]}"> + <group name="packaging" string="Packaging" + colspan="4" + attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}" + groups="product.group_stock_packaging"> + <field name="packaging_ids" nolabel="1" context="{'default_product_id': product_variant_id,'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}"/> + </group> + </page> <page string="Notes" name="notes"> <group name="description"> - <group string="Description for Quotations"> - <field name="description_sale" nolabel="1" placeholder="This note will be displayed on the quotations."/> + <group string="Description for Customers" attrs="{'invisible': [('sale_ok','=',False)]}"> + <field name="description_sale" nolabel="1" placeholder="This note will show up on sales orders."/> </group> </group> - <group name="warning"/> + <group name="warning"> + <group name="sale_warning"/> + <group name="purchase_warning"/> + </group> </page> </notebook> </sheet> @@ -308,7 +311,7 @@ <field name="name" position="after"> <field name="product_tmpl_id" class="oe_inline" readonly="1" invisible="1" attrs="{'required': [('id', '!=', False)]}"/> </field> - <field name="item_ids" position="replace"> + <field name="item_ids" position="inside"> <field name="pricelist_item_ids" widget="many2many"> <tree string="Pricelist Items"> <field name="pricelist_id"/> diff --git a/addons/product_email_template/views/product_views.xml b/addons/product_email_template/views/product_views.xml index 7e652754756..f4101189981 100644 --- a/addons/product_email_template/views/product_views.xml +++ b/addons/product_email_template/views/product_views.xml @@ -6,11 +6,11 @@ <field name="inherit_id" ref="product.product_template_form_view"/> <field name="arch" type="xml"> <group name="email_template_and_project" position="attributes"> - <attribute name="string">Miscellaneous</attribute> + <attribute name="string">Email</attribute> <attribute name="attrs"></attribute> </group> <group name="email_template_and_project" position="inside"> - <field name="email_template_id" string="Invoice Confirmation Email" + <field name="email_template_id" string="Email Template" help="Send a product-specific email once the invoice is paid" domain="[('model','=','product.template')]" context="{ 'form_view_ref':'product_email_template.email_template_form_simplified', @@ -18,7 +18,6 @@ 'default_subject': name, 'default_name': name, }"/> - /> </group> </field> </record> diff --git a/addons/product_expiry/views/product_template_views.xml b/addons/product_expiry/views/product_template_views.xml index a8587dbb530..b68ab2aa19d 100644 --- a/addons/product_expiry/views/product_template_views.xml +++ b/addons/product_expiry/views/product_template_views.xml @@ -5,26 +5,26 @@ <field name="model">product.template</field> <field name="inherit_id" ref="stock.view_template_property_form" /> <field name="arch" type="xml"> - <group name="stock_property" position="after"> - <group name="expiry_and_lots" groups="stock.group_production_lot" attrs="{'invisible': [('tracking','=','none')]}"> - <label for="life_time"/> - <div class="o_row"> - <field name="life_time" /> + <group name="traceability" position="after"> + <group string="Dates" name="expiry_and_lots" groups="stock.group_production_lot" attrs="{'invisible': [('tracking', '=','none')]}"> + <label for="use_time"/> + <div> + <field name="use_time" class="oe_inline"/> <span>days</span> </div> - <label for="use_time"/> - <div class="o_row"> - <field name="use_time" /> + <label for="life_time"/> + <div> + <field name="life_time" class="oe_inline"/> <span>days</span> </div> <label for="removal_time"/> - <div class="o_row"> - <field name="removal_time" /> + <div> + <field name="removal_time" class="oe_inline"/> <span>days</span> </div> <label for="alert_time"/> - <div class="o_row"> - <field name="alert_time" /> + <div> + <field name="alert_time" class="oe_inline"/> <span>days</span> </div> </group> diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 044e6c13891..ffd1c1fa559 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -1100,7 +1100,7 @@ class ProductTemplate(models.Model): purchase_method = fields.Selection([ ('purchase', 'On ordered quantities'), ('receive', 'On received quantities'), - ], string="Control Purchase Bills", + ], string="Control Policy", help="On ordered quantities: control bills based on ordered quantities.\n" "On received quantities: control bills based on received quantity.", default="receive") route_ids = fields.Many2many(default=lambda self: self._get_buy_route()) diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml index d70ed23aee5..988f3595983 100644 --- a/addons/purchase/views/purchase_views.xml +++ b/addons/purchase/views/purchase_views.xml @@ -558,14 +558,19 @@ <field name="model">product.template</field> <field name="inherit_id" ref="product.product_template_form_view"/> <field name="arch" type="xml"> - <group name="inventory" position="after"> - <separator string="Vendors"/> - <field name="seller_ids" context="{'default_product_tmpl_id': context.get('product_tmpl_id', active_id)}"/> + <page name="sales" position="after"> + <page string="Purchase" name="purchase" attrs="{'invisible': [('purchase_ok','=',False)]}"> + <group string="Vendors" name="vendors"> + <field name="seller_ids" context="{'default_product_tmpl_id': context.get('product_tmpl_id', active_id)}" nolabel="1"/> + </group> + </page> + </page> + <group name="invoicing" position="inside"> + <group string="Purchase Bills" name="bill" attrs="{'invisible': [('purchase_ok','=',False)]}" groups="purchase.group_purchase_manager"> + <field name="purchase_method" widget="radio"/> + </group> </group> - <field name="uom_po_id" position="after"> - <field name="purchase_method" widget="radio" groups="purchase.group_purchase_manager"/> - </field> - <group name="warning" position="inside"> + <group name="purchase_warning" position="replace"> <group string="Warning when Purchasing this Product" groups="purchase.group_warning_purchase"> <field name="purchase_line_warn" nolabel="1"/> <field name="purchase_line_warn_msg" colspan="3" nolabel="1" @@ -573,9 +578,9 @@ </group> </group> <group name="description" position="inside"> - <group string="Description for Vendors"> + <group string="Description for Vendors" attrs="{'invisible': [('purchase_ok','=',False)]}"> <field name="description_purchase" nolabel="1" - placeholder="This note will be displayed for vendors."/> + placeholder="This note will show up on purchase orders."/> </group> </group> </field> @@ -587,7 +592,7 @@ <field name="inherit_id" ref="account.view_category_property_form"/> <field name="arch" type="xml"> <field name="property_account_income_categ_id" position="before"> - <field name="property_account_creditor_price_difference_categ" domain="[('deprecated','=',False)]"/> + <field name="property_account_creditor_price_difference_categ" domain="[('deprecated','=',False)]" groups="account.group_account_user"/> </field> </field> </record> @@ -606,7 +611,7 @@ <field name="inherit_id" ref="account.product_template_form_view"/> <field name="arch" type="xml"> <field name="property_account_expense_id" position="replace" > - <field name="property_account_expense_id" domain="[('deprecated','=',False)]" attrs="{'readonly': [('purchase_ok', '=', 0)]}" groups="account.group_account_user"/> + <field name="property_account_expense_id" domain="[('deprecated','=',False)]" attrs="{'readonly': [('purchase_ok', '=', 0)]}"/> </field> <field name='supplier_taxes_id' position="replace" > <field name="supplier_taxes_id" colspan="2" widget="many2many_tags" attrs="{'readonly':[('purchase_ok','=',0)]}"/> @@ -634,8 +639,7 @@ <field name="model">product.template</field> <field name="inherit_id" ref="account.product_template_form_view"/> <field name="arch" type="xml"> - <field name="supplier_taxes_id" position="after"> - <label string="" colspan="2"/> + <field name="property_account_expense_id" position="after"> <field name="property_account_creditor_price_difference" domain="[('deprecated','=',False)]" attrs="{'readonly':[('purchase_ok', '=', 0)]}" /> </field> </field> diff --git a/addons/purchase_requisition/views/purchase_requisition_views.xml b/addons/purchase_requisition/views/purchase_requisition_views.xml index 61fac151782..55a6eb5ca05 100644 --- a/addons/purchase_requisition/views/purchase_requisition_views.xml +++ b/addons/purchase_requisition/views/purchase_requisition_views.xml @@ -256,11 +256,13 @@ <record model="ir.ui.view" id="product_template_form_view_inherit"> <field name="name">product.template.form.inherit</field> <field name="model">product.template</field> - <field name="inherit_id" ref="stock.view_template_property_form"/> + <field name="inherit_id" ref="purchase.view_product_supplier_inherit"/> <field name="arch" type="xml"> - <field name="route_ids" position="after"> - <field name="purchase_requisition" widget="radio"/> - </field> + <group name="vendors" position="after"> + <group string="Reordering"> + <field name="purchase_requisition" widget="radio"/> + </group> + </group> </field> </record> diff --git a/addons/report_intrastat/models/report_intrastat.py b/addons/report_intrastat/models/report_intrastat.py index 12552c56f28..8381b513425 100644 --- a/addons/report_intrastat/models/report_intrastat.py +++ b/addons/report_intrastat/models/report_intrastat.py @@ -21,4 +21,4 @@ class ReportIntrastatCode(models.Model): class ProductTemplate(models.Model): _inherit = "product.template" - intrastat_id = fields.Many2one('report.intrastat.code', string='Intrastat code') + intrastat_id = fields.Many2one('report.intrastat.code', string='Intrastat Code') diff --git a/addons/report_intrastat/views/report_intrastat_views.xml b/addons/report_intrastat/views/report_intrastat_views.xml index f91c5db3745..729864de967 100644 --- a/addons/report_intrastat/views/report_intrastat_views.xml +++ b/addons/report_intrastat/views/report_intrastat_views.xml @@ -29,10 +29,8 @@ <field name="model">product.template</field> <field name="inherit_id" ref="stock.view_template_property_form"/> <field name="arch" type="xml"> - <group name="group_lots_and_weight" position="after"> - <group> - <field name="intrastat_id"/> - </group> + <group name="group_lots_and_weight" position="inside"> + <field name="intrastat_id"/> </group> </field> </record> diff --git a/addons/sale/models/product_template.py b/addons/sale/models/product_template.py index 6d51984b51e..4a7a58f05e6 100644 --- a/addons/sale/models/product_template.py +++ b/addons/sale/models/product_template.py @@ -16,7 +16,7 @@ class ProductTemplate(models.Model): sale_line_warn = fields.Selection(WARNING_MESSAGE, 'Sales Order Line', help=WARNING_HELP, required=True, default="no-message") sale_line_warn_msg = fields.Text('Message for Sales Order Line') expense_policy = fields.Selection( - [('no', 'No'), ('cost', 'At cost'), ('sales_price', 'At sale price')], + [('no', 'No'), ('cost', 'At cost'), ('sales_price', 'Sales price')], string='Re-Invoice Expenses', default='no') diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index 2a6ebab121f..58cff62bab2 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -610,6 +610,13 @@ <field string="Sales" name="sales_count" widget="statinfo" /> </button> </button> + <group name="sale_warning" position="replace"> + <group string="Warning when Selling this Product" groups="sale.group_warning_sale"> + <field name="sale_line_warn" nolabel="1"/> + <field name="sale_line_warn_msg" colspan="3" nolabel="1" + attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')]}"/> + </group> + </group> </field> </record> @@ -625,7 +632,7 @@ <field string="Sales" name="sales_count" widget="statinfo" /> </button> </button> - <group name="warning" position="inside"> + <group name="sale_warning" position="replace"> <group string="Warning when Selling this Product" groups="sale.group_warning_sale"> <field name="sale_line_warn" nolabel="1"/> <field name="sale_line_warn_msg" colspan="3" nolabel="1" @@ -640,13 +647,12 @@ <field name="model">product.template</field> <field name="inherit_id" ref="product.product_template_form_view"/> <field name="arch" type="xml"> - <page name="invoicing" position="inside"> - <separator string="Invoicing Policy"/> - <group> + <group name="invoicing" position="inside"> + <group string="Invoicing" name="invoicing" attrs="{'invisible': [('sale_ok','=',False)]}"> <field name="invoice_policy" widget="radio"/> <field name="track_service" widget="radio" invisible="True"/> </group> - </page> + </group> </field> </record> diff --git a/addons/sale_expense/views/product_view.xml b/addons/sale_expense/views/product_view.xml index ddedc50e4dc..90539c2fade 100644 --- a/addons/sale_expense/views/product_view.xml +++ b/addons/sale_expense/views/product_view.xml @@ -5,7 +5,7 @@ <field name="model">product.template</field> <field name="inherit_id" ref="sale.product_template_form_view_invoice_policy"/> <field name="arch" type="xml"> - <field name="invoice_policy" position="after"> + <field name="track_service" position="after"> <field name="expense_policy" widget="radio" attrs="{'invisible': [('can_be_expensed','=',False)]}"/> </field> diff --git a/addons/sale_stock/views/stock_views.xml b/addons/sale_stock/views/stock_views.xml index 4dd032e1519..edd98a6da33 100644 --- a/addons/sale_stock/views/stock_views.xml +++ b/addons/sale_stock/views/stock_views.xml @@ -12,7 +12,7 @@ parent="sales_team.menu_base_partner" sequence="5" /> <menuitem id="menu_invoiced" name="Invoicing" parent="menu_aftersale" sequence="1"/> - <record id="stock_location_route_form_view_inherit_sale_stock" model="ir.ui.view"> + <record id="stock_location_route_view_form_inherit_sale_stock" model="ir.ui.view"> <field name="name">stock.location.route.form</field> <field name="inherit_id" ref="stock.stock_location_route_form_view"/> <field name="model">stock.location.route</field> @@ -23,5 +23,27 @@ </field> </record> + <record id="product_template_view_form_inherit_sale" model="ir.ui.view"> + <field name="name">product.template.inherit.form</field> + <field name="inherit_id" ref="sale.product_template_form_view_sale_order_button"/> + <field name="model">product.template</field> + <field name="arch" type="xml"> + <xpath expr="//button[@name='action_view_sales'][last()]" position="replace" /> + </field> + </record> + + <record id="product_template_view_form_inherit_stock" model="ir.ui.view"> + <field name="name">product.template.inherit.form</field> + <field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/> + <field name="model">product.template</field> + <field name="arch" type="xml"> + <button name="action_view_orderpoints" position="after"> + <button class="oe_stat_button" name="action_view_sales" + type="object" icon="fa-usd"> + <field string="Sales" name="sales_count" widget="statinfo" /> + </button> + </button> + </field> + </record> </data> </odoo> diff --git a/addons/stock/views/product_views.xml b/addons/stock/views/product_views.xml index f48ccd89a0c..bbcbafb7b08 100644 --- a/addons/stock/views/product_views.xml +++ b/addons/stock/views/product_views.xml @@ -125,22 +125,28 @@ <field name="arch" type="xml"> <group name="packaging" position="before"> <group name="inventory"> - <group> + <group string="Operations" name="operations"> <field name="route_ids" widget="many2many_checkboxes" attrs="{'invisible':[('type', 'in', ['service', 'digital'])]}"/> <field name="route_from_categ_ids" widget="many2many_tags" readonly="1" attrs="{'invisible':[('route_from_categ_ids', '=', [])]}"/> + <label for="sale_delay"/> + <div> + <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days + </div> </group> - <group name="group_lots_and_weight"> - <label for="weight" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"/> - <div class="o_row" name="weight" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"> + <group string="Logistics" name="group_lots_and_weight" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"> + <label for="weight"/> + <div class="o_row" name="weight"> <field name="weight"/> </div> - <field name="tracking" widget="radio" attrs="{'invisible':[('type', 'in', ['service', 'digital'])]}" groups="stock.group_production_lot"/> - <label for="volume" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"/> - <div class="o_row" name="volume" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1)]}"> + <label for="volume"/> + <div class="o_row" name="volume"> <field name="volume" string="Volume"/> </div> </group> - <group name="stock_property" groups="base.group_no_one"> + <group string="Traceability" name="traceability" groups="stock.group_production_lot"> + <field name="tracking" widget="radio" attrs="{'invisible':[('type', 'in', ['service', 'digital'])]}"/> + </group> + <group string="Counterpart Locations" name="stock_property" groups="base.group_no_one"> <field name="property_stock_procurement" domain="[('usage','=','procurement')]"/> <field name="property_stock_production" domain="[('usage','=','production')]"/> <field name="property_stock_inventory" domain="[('usage','=','inventory')]"/> @@ -149,27 +155,15 @@ </group> <group name="description" position="after"> <group> - <group string="Description for Internal Transfers"> - <field name="description_picking" placeholder="Description for Internal Transfers (Rack, Row and Case Information)" nolabel="1"/> - </group> <group string="Description for Delivery Orders"> - <field name="description_pickingout" nolabel="1" placeholder="This note will be displayed on Delivery orders."/> + <field name="description_pickingout" nolabel="1" placeholder="This note will show up on delivery orders."/> + </group> + <group string="Description for Receptions"> + <field name="description_pickingin" nolabel="1" placeholder="This note will show up on the receipt orders (e.g. where to store the product in the warehouse)."/> + </group> + <group string="Description for Internal Transfers"> + <field name="description_picking" placeholder="This note will show up on internal transfer orders (e.g. where to pick the product in the warehouse)." nolabel="1"/> </group> - </group> - <group string="Description for Receptions"> - <field name="description_pickingin" nolabel="1" placeholder="This note will be displayed on the Receptions."/> - </group> - </group> - <group name="email_template_and_project" position="before"> - <group name="sale_condition" string="Sale Conditions"> - <label for="warranty" groups="stock.group_production_lot"/> - <div groups="stock.group_production_lot"> - <field name="warranty" class="oe_inline"/> months - </div> - <label for="sale_delay"/> - <div> - <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days - </div> </group> </group> </field> diff --git a/addons/stock_account/views/product_views.xml b/addons/stock_account/views/product_views.xml index 489340094ee..c9ff635a42b 100644 --- a/addons/stock_account/views/product_views.xml +++ b/addons/stock_account/views/product_views.xml @@ -39,7 +39,7 @@ </field> <field name="standard_price" position="replace"> <field name="standard_price" - attrs="{'readonly':['&', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" class="oe_inline" + attrs="{'readonly':['&', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" widget='monetary' options="{'currency_field': 'currency_id'}"/> </field> <div name="standard_price_uom" position="after"> @@ -49,13 +49,11 @@ class="oe_link oe_read_only" colspan="2"/> </div> <group name="accounting" position="inside"> - <group name="property_inventory_valuation" attrs="{'invisible': [('type','=','service')]}"> + <group name="property_inventory_valuation" string="Stock Valuation" attrs="{'invisible': [('type','=','service'), ('valuation', '!=', 'real_time')]}"> <field name="property_valuation" invisible="1"/> <field name="property_stock_account_input" - attrs="{'invisible':[ ('valuation', '!=', 'real_time')]}" domain="[('deprecated', '=', False)]"/> <field name="property_stock_account_output" - attrs="{'invisible':[ ('valuation', '!=', 'real_time')]}" domain="[('deprecated', '=', False)]"/> </group> </group> diff --git a/addons/stock_landed_costs/models/product.py b/addons/stock_landed_costs/models/product.py index ca336cc7c4f..1b124a20b3c 100644 --- a/addons/stock_landed_costs/models/product.py +++ b/addons/stock_landed_costs/models/product.py @@ -15,7 +15,7 @@ SPLIT_METHOD = [ class ProductTemplate(models.Model): _inherit = "product.template" - landed_cost_ok = fields.Boolean('Landed Costs') + landed_cost_ok = fields.Boolean('Is a Landed Cost') split_method = fields.Selection( selection=SPLIT_METHOD, string='Split Method', default='equal', help="Equal : Cost will be equally divided.\n" diff --git a/addons/stock_landed_costs/views/product_views.xml b/addons/stock_landed_costs/views/product_views.xml index 0749add5b6d..dc392b7a482 100644 --- a/addons/stock_landed_costs/views/product_views.xml +++ b/addons/stock_landed_costs/views/product_views.xml @@ -4,10 +4,10 @@ <record id="view_product_landed_cost_form" model="ir.ui.view"> <field name="name">product.template.landed.cost.form</field> <field name="model">product.template</field> - <field name="inherit_id" ref="product.product_template_form_view"/> + <field name="inherit_id" ref="purchase.view_product_supplier_inherit"/> <field name="arch" type="xml"> <group name="accounting" position="inside"> - <group> + <group string="Landed Costs"> <field name="landed_cost_ok" class="oe_inline" attrs="{'invisible':[('type', 'not in', ['product', 'consu', 'service'])]}"/> <field name="split_method" attrs="{'invisible':['|', ('landed_cost_ok', '=' ,False), ('type', 'not in', ['product', 'consu', 'service'])]}"/> </group> diff --git a/addons/website_sale/views/product_views.xml b/addons/website_sale/views/product_views.xml index ac6fe261357..bc18e1de049 100644 --- a/addons/website_sale/views/product_views.xml +++ b/addons/website_sale/views/product_views.xml @@ -79,7 +79,7 @@ </group> <button name="toggle_active" position="before"> <button class="oe_stat_button" name="website_publish_button" - type="object" icon="fa-globe"> + type="object" icon="fa-globe" attrs="{'invisible': [('sale_ok','=',False)]}"> <field name="website_published" widget="website_button"/> </button> </button> |
