diff options
| author | Parth Choksi <pch@odoo.com> | 2019-07-11 09:58:07 +0000 |
|---|---|---|
| committer | Damien Bouvy <dbo@odoo.com> | 2019-08-08 07:53:44 +0000 |
| commit | 3ee0d3b68b8ceeb4fcd3379fd8c87ae402835139 (patch) | |
| tree | be2df0fc32022306a38d61f49e6efd5a2dfb6d7b | |
| parent | e3f327a61fd15a54afae0b20227696418d6d409c (diff) | |
[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
4 files changed, 16 insertions, 11 deletions
diff --git a/addons/delivery/views/delivery_view.xml b/addons/delivery/views/delivery_view.xml index 5a451302f91..211603bc6b0 100644 --- a/addons/delivery/views/delivery_view.xml +++ b/addons/delivery/views/delivery_view.xml @@ -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)]}" diff --git a/addons/sale_coupon/views/sale_order_views.xml b/addons/sale_coupon/views/sale_order_views.xml index 16c1f3fc511..b21cdde15d4 100644 --- a/addons/sale_coupon/views/sale_order_views.xml +++ b/addons/sale_coupon/views/sale_order_views.xml @@ -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> diff --git a/addons/sale_coupon/wizard/sale_coupon_apply_code.py b/addons/sale_coupon/wizard/sale_coupon_apply_code.py index a31ddab4280..fde5b1bdec6 100644 --- a/addons/sale_coupon/wizard/sale_coupon_apply_code.py +++ b/addons/sale_coupon/wizard/sale_coupon_apply_code.py @@ -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): """ diff --git a/addons/sale_coupon/wizard/sale_coupon_apply_code_views.xml b/addons/sale_coupon/wizard/sale_coupon_apply_code_views.xml index 41977019bd6..bc146e58ec1 100644 --- a/addons/sale_coupon/wizard/sale_coupon_apply_code_views.xml +++ b/addons/sale_coupon/wizard/sale_coupon_apply_code_views.xml @@ -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> |
