summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrakash Prajapati <ppr@odoo.com>2019-01-23 06:04:04 +0000
committerjem-odoo <jem@openerp.com>2019-04-04 08:59:01 +0000
commitc76c93a9ac7d13b8dd20be03133662f3e8b458ca (patch)
tree786225d96a4dafd3861201a2614e74e68e35ba0b
parent407834d1cadd6df6d548830d915f5b20b04b4e13 (diff)
[IMP] sale, website_sale, *: Improve the sale order form.
Relabel placeholder of terms & conditions. Restructure tab "Other Information". Improve the tooltips. TaskID: 1920476 closes odoo/odoo#30550
-rw-r--r--addons/sale/models/sale.py10
-rw-r--r--addons/sale/views/sale_views.xml32
-rw-r--r--addons/sale_crm/views/sale_order_views.xml4
-rw-r--r--addons/sale_management/views/sale_management_views.xml2
-rw-r--r--addons/sale_stock/models/sale_order.py2
-rw-r--r--addons/website_sale/views/sale_order_views.xml2
-rw-r--r--addons/website_sale_link_tracker/views/sale_order_views.xml2
7 files changed, 29 insertions, 25 deletions
diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py
index ad1362bd58d..d74dc58412b 100644
--- a/addons/sale/models/sale.py
+++ b/addons/sale/models/sale.py
@@ -134,7 +134,7 @@ class SaleOrder(models.Model):
], string='Status', readonly=True, copy=False, index=True, tracking=3, default='draft')
date_order = fields.Datetime(string='Order Date', required=True, readonly=True, index=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, copy=False, default=fields.Datetime.now)
validity_date = fields.Date(string='Expiration', readonly=True, copy=False, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
- help="Expiration date of the quotation, after this date, the customer won't be able to validate the quotation online.", default=_default_validity_date)
+ help="Beyond this date, the customer is no longer able to accept the quotation from the portal.", default=_default_validity_date)
is_expired = fields.Boolean(compute='_compute_is_expired', string="Is expired")
require_signature = fields.Boolean('Online Signature', default=_get_default_require_signature, readonly=True,
states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
@@ -146,11 +146,11 @@ class SaleOrder(models.Model):
create_date = fields.Datetime(string='Creation Date', readonly=True, index=True, help="Date on which sales order is created.")
confirmation_date = fields.Datetime(string='Confirmation Date', readonly=True, index=True, help="Date on which the sales order is confirmed.", oldname="date_confirm", copy=False)
user_id = fields.Many2one('res.users', string='Salesperson', index=True, tracking=2, default=lambda self: self.env.user)
- partner_id = fields.Many2one('res.partner', string='Customer', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, required=True, change_default=True, index=True, tracking=1, help="You can find a customer by its Name, TIN, Email or Internal Reference.")
+ partner_id = fields.Many2one('res.partner', string='Customer', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, required=True, change_default=True, index=True, tracking=1, help="You can find a customer from their name, email, tax ID or reference.")
partner_invoice_id = fields.Many2one('res.partner', string='Invoice Address', readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)], 'sale': [('readonly', False)]}, help="Invoice address for current sales order.")
partner_shipping_id = fields.Many2one('res.partner', string='Delivery Address', readonly=True, required=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)], 'sale': [('readonly', False)]}, help="Delivery address for current sales order.")
- pricelist_id = fields.Many2one('product.pricelist', string='Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Pricelist for current sales order.")
+ pricelist_id = fields.Many2one('product.pricelist', string='Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Pricelist for current order. If you change the pricelist, only new lines will consider this pricelist.")
currency_id = fields.Many2one("res.currency", related='pricelist_id.currency_id', string="Currency", readonly=True, required=True)
analytic_account_id = fields.Many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="The analytic account related to a sales order.", copy=False, oldname='project_id')
@@ -173,8 +173,8 @@ class SaleOrder(models.Model):
amount_total = fields.Monetary(string='Total', store=True, readonly=True, compute='_amount_all', tracking=4)
currency_rate = fields.Float("Currency Rate", compute='_compute_currency_rate', compute_sudo=True, store=True, digits=(12, 6), readonly=True, help='The rate of the currency to the currency of rate 1 applicable at the date of the order')
- payment_term_id = fields.Many2one('account.payment.term', string='Payment Terms', oldname='payment_term')
- fiscal_position_id = fields.Many2one('account.fiscal.position', oldname='fiscal_position', string='Fiscal Position')
+ payment_term_id = fields.Many2one('account.payment.term', string='Payment Terms', oldname='payment_term', help="Payment terms applies to all invoices issued from this order.")
+ fiscal_position_id = fields.Many2one('account.fiscal.position', oldname='fiscal_position', string='Fiscal Position', help=" Fiscal positions are used to adapt taxes and accounts for particular customers or sales orders/invoices. The default value comes from the customer.")
company_id = fields.Many2one('res.company', 'Company', default=lambda self: self.env['res.company']._company_default_get('sale.order'))
team_id = fields.Many2one('crm.team', 'Sales Team', change_default=True, default=_get_default_team, oldname='section_id')
diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml
index bee7433ca85..c32d1fe7af6 100644
--- a/addons/sale/views/sale_views.xml
+++ b/addons/sale/views/sale_views.xml
@@ -540,35 +540,39 @@
</div>
<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
</group>
- <field name="note" class="oe_inline" placeholder="Terms and conditions... Configuration menu)"/>
+ <field name="note" class="oe_inline" placeholder="Terms and conditions..."/>
<div class="oe_clear"/>
</group>
</page>
- <page string="Other Information" name="other_information">
+ <page string="Other Info" name="other_information">
<group>
- <group string="Shipping Information" name="sale_shipping" groups="sale.group_sale_order_dates">
- <field name="expected_date" groups="sale.group_sale_order_dates"/>
- <field name="commitment_date" groups="sale.group_sale_order_dates"/>
- </group>
- <group string="Sales Information" name="sales_person">
+ <group name="sales_person">
+ <field name="date_order" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}" string="Quotation Date"/>
<field name="user_id"/>
<field name="team_id" options="{'no_create': True}"/>
- <field name="client_order_ref"/>
+ <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="require_signature"/>
<field name="require_payment"/>
<field name="reference" readonly="1" attrs="{'invisible': [('reference', '=', False)]}"/>
- <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="analytic_account_id" context="{'default_partner_id':partner_invoice_id, 'default_name':name}" attrs="{'readonly': [('invoice_count','!=',0),('state','=','sale')]}" groups="analytic.group_analytic_accounting" force_save="1"/>
</group>
- <group name="sale_pay" string="Invoicing">
- <field name="date_order" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/>
+ <group name="sale_info">
+ <field name="client_order_ref"/>
<field name="fiscal_position_id" options="{'no_create': True}"/>
<field name="invoice_status" states="sale,done" invisible="1"/>
</group>
- <group string="Reporting" name="technical" groups="base.group_no_one">
- <field groups="base.group_no_one" name="origin"/>
+ </group>
+ <group>
+ <group string="Shipping Information" name="sale_shipping">
+ <field name="expected_date" groups="sale.group_sale_order_dates"/>
+ <field name="commitment_date" groups="sale.group_sale_order_dates"/>
+ </group>
+ <group string="Reporting" groups="base.group_no_one">
+ <group name="technical" colspan="2" class="mb-0">
+ <field name="origin"/>
+ </group>
+ <group name="utm_link" colspan="2"/>
</group>
- <group name="utm_link" groups="base.group_no_one"/>
</group>
</page>
<page groups="base.group_no_one" string="Customer Signature" name="customer_signature" attrs="{'invisible': [('require_signature', '=', False), ('signed_by', '=', False), ('signature', '=', False), ('signed_on', '=', False)]}">
diff --git a/addons/sale_crm/views/sale_order_views.xml b/addons/sale_crm/views/sale_order_views.xml
index 32afdf3fc7e..61318da066b 100644
--- a/addons/sale_crm/views/sale_order_views.xml
+++ b/addons/sale_crm/views/sale_order_views.xml
@@ -35,11 +35,11 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
- <field name="user_id" position="after">
+ <field name="client_order_ref" position="after">
<field name="tag_ids" widget="many2many_tags"/>
</field>
<xpath expr="//group[@name='utm_link']" position="replace">
- <group string="Marketing" name="utm_link" groups="base.group_no_one">
+ <group name="utm_link" colspan="2" class="mt-0">
<field name="campaign_id"/>
<field name="medium_id"/>
<field name="source_id"/>
diff --git a/addons/sale_management/views/sale_management_views.xml b/addons/sale_management/views/sale_management_views.xml
index f81cd85dc7b..cd9a1cdd420 100644
--- a/addons/sale_management/views/sale_management_views.xml
+++ b/addons/sale_management/views/sale_management_views.xml
@@ -69,7 +69,7 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
- <xpath expr="//group[@name='sale_pay']/field[@name='invoice_status']" position="attributes">
+ <xpath expr="//group[@name='sale_info']/field[@name='invoice_status']" position="attributes">
<attribute name="invisible" eval="False"/>
</xpath>
<xpath expr="//button[@name='action_quotation_send']" position="before">
diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py
index 0b38a867a4a..e3de3e4c800 100644
--- a/addons/sale_stock/models/sale_order.py
+++ b/addons/sale_stock/models/sale_order.py
@@ -18,7 +18,7 @@ class SaleOrder(models.Model):
return warehouse_ids
incoterm = fields.Many2one(
- 'account.incoterms', 'Incoterms',
+ 'account.incoterms', 'Incoterm',
help="International Commercial Terms are a series of predefined commercial terms used in international transactions.")
picking_policy = fields.Selection([
('direct', 'As soon as possible'),
diff --git a/addons/website_sale/views/sale_order_views.xml b/addons/website_sale/views/sale_order_views.xml
index 07ee626c17d..840090a5d72 100644
--- a/addons/website_sale/views/sale_order_views.xml
+++ b/addons/website_sale/views/sale_order_views.xml
@@ -267,7 +267,7 @@
<field name="partner_id" position="attributes">
<attribute name="context">{'display_website': True}</attribute>
</field>
- <field name="company_id" position="after">
+ <field name="team_id" position="after">
<field name="website_id" groups="website.group_multi_website"/>
</field>
</field>
diff --git a/addons/website_sale_link_tracker/views/sale_order_views.xml b/addons/website_sale_link_tracker/views/sale_order_views.xml
index c8923f33887..c9a8f09bb29 100644
--- a/addons/website_sale_link_tracker/views/sale_order_views.xml
+++ b/addons/website_sale_link_tracker/views/sale_order_views.xml
@@ -6,7 +6,7 @@
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='utm_link']" position="replace">
- <group string="Marketing" name="utm_link" groups="base.group_no_one">
+ <group name="utm_link" colspan="2" class="mt-0">
<field name="campaign_id"/>
<field name="medium_id"/>
<field name="source_id"/>