[IMP] delivery, sale_coupon: layout changes

Changed positions of some buttons.
Changed wordings.
Some minor wording and layout improvements in wizard for coupon.

task-2033229
This commit is contained in:
Parth Choksi
2019-08-08 07:53:44 +00:00
committed by Damien Bouvy
parent e3f327a61f
commit 3ee0d3b68b
4 changed files with 16 additions and 11 deletions
+2 -2
View File
@@ -323,9 +323,9 @@
<field name="recompute_delivery_price" invisible="1"/>
</xpath>
<xpath expr="//group[@name='note_group']" position="before">
<div class="oe_left" style="margin-left: 10px">
<div class="oe_right">
<button
string="Add a shipping method"
string="Add shipping"
name="action_open_delivery_wizard"
type="object"
attrs="{'invisible': ['|', '|',('is_all_service', '=', True), ('order_line', '=', []), ('delivery_set', '=', True)]}"
@@ -5,11 +5,14 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//header/button[@name='action_cancel']" position="before">
<button name="%(sale_coupon.sale_coupon_apply_code_action)d" string="Apply Coupon" type="action" groups="base.group_user" states="draft"/>
</xpath>
<xpath expr="//header/button[@name='action_cancel']" position="before">
<button name="recompute_coupon_lines" string="Update Promotions" type="object" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/>
<xpath expr="//group[@name='note_group']" position="before">
<div class="oe_right">
<button name="%(sale_coupon.sale_coupon_apply_code_action)d" class="btn btn-secondary"
string="Add Coupon" type="action" groups="base.group_user" states="draft"/>
<button name="recompute_coupon_lines" class="btn btn-secondary" string="Add Promotions"
help="When clicked, the content of the order will be checked to detect (and apply) possible promotion programs."
type="object" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/>
</div>
</xpath>
</field>
</record>
@@ -9,7 +9,7 @@ class SaleCouponApplyCode(models.TransientModel):
_rec_name = 'coupon_code'
_description = 'Sales Coupon Apply Code'
coupon_code = fields.Char(string="Coupon", required=True)
coupon_code = fields.Char(string="Code", required=True)
def process_coupon(self):
"""
@@ -6,10 +6,12 @@
<field name="arch" type="xml">
<form string="Apply coupon">
<group>
<field name="coupon_code"/>
<group>
<field name="coupon_code"/>
</group>
</group>
<footer>
<button name="process_coupon" string="Apply Coupon" type="object" class="oe_highlight"/>
<button name="process_coupon" string="Apply" type="object" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
@@ -17,7 +19,7 @@
</record>
<record id="sale_coupon_apply_code_action" model="ir.actions.act_window">
<field name="name">Enter Coupon Code</field>
<field name="name">Enter Promotion or Coupon Code</field>
<field name="res_model">sale.coupon.apply.code</field>
<field name="view_mode">form</field>
<field name="target">new</field>