[IMP] sale,sale_management: improve quotation template form view

With this commit, we have improved the UI for the Prepayment amount field
in both the quotation template form view and the Sale order form view.
The changes have made it easier for users to input and review information.

task-3546106

closes odoo/odoo#139461

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
nikj-odoo
2023-11-28 21:20:45 +00:00
parent 8a18f27ee1
commit bcc42d4a8a
2 changed files with 24 additions and 16 deletions
+11 -8
View File
@@ -694,14 +694,17 @@
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="require_signature"
readonly="state in ['cancel', 'sale']"/>
<field name="require_payment"
readonly="state in ['cancel', 'sale']"/>
<field name="prepayment_percent"
readonly="state in ['cancel', 'sale']"
invisible="not require_payment"
widget="percentage"
string="Prepayment amount"
style="width: 3rem"/>
<label for="require_payment"/>
<div id="require_payment">
<field name="require_payment"
readonly="state in ['cancel', 'sale']"/>
<span class="mx-3" invisible="not require_payment">of</span>
<field name="prepayment_percent"
readonly="state in ['cancel', 'sale']"
invisible="not require_payment"
widget="percentage"
style="width: 3rem"/>
</div>
<field name="reference" readonly="1" invisible="not reference"/>
<field name="client_order_ref"/>
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
@@ -31,22 +31,27 @@
<group>
<group name="sale_info">
<field name="active" invisible="1"/>
<label for="number_of_days" string="Quotation expires after"/>
<label for="number_of_days" string="Quotation Validity"/>
<div id="number_of_days">
<field name="number_of_days" style="width: 3rem;"/>
<div class="d-inline-block">days</div>
</div>
<field name="require_signature"/>
<field name="require_payment"/>
<field name="prepayment_percent"
invisible="not require_payment"
widget="percentage"
string="Prepayment amount"
style="width: 3rem"/>
<field name="mail_template_id" context="{'default_model': 'sale.order'}"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="journal_id"/>
</group>
<group name="so_confirmation">
<field name="require_signature"/>
<label for="require_payment"/>
<div id="require_payment" class="o_row">
<field name="require_payment" class="oe_inline"/>
<span invisible="not require_payment">of</span>
<field name="prepayment_percent"
invisible="not require_payment"
widget="percentage"
class="oe_inline"/>
</div>
</group>
</group>
<notebook name="main_book">
<page string="Lines" name="order_lines">