[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
This commit is contained in:
committed by
jem-odoo
parent
407834d1ca
commit
c76c93a9ac
@@ -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')
|
||||
|
||||
|
||||
@@ -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)]}">
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user