Skip to content

Commit

Permalink
[10.0][IMP] sale_product_set: move add set smart button header (OCA…
Browse files Browse the repository at this point in the history
…#543)

* [imp] move SO `add set` button to smartbutton header

* [fix] sale_product_set: PEP8
  • Loading branch information
leemannd authored and phuctranfxvn committed Dec 27, 2020
1 parent 4e4325c commit 472ecaf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
9 changes: 4 additions & 5 deletions sale_product_set/__openerp__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# -*- coding: utf-8 -*-

# Copyright 2015 Anybox
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
'name': 'Sale product set',
'category': 'Sale',
'license': 'AGPL-3',
'author': 'Anybox, Odoo Community Association (OCA)',
'version': '10.0.1.0.1',
'sequence': 150,
'version': '10.0.1.0.2',
'website': 'https:/OCA/sale-workflow',
'summary': "Sale product set",
'depends': [
Expand All @@ -22,6 +23,4 @@
'demo/product_set_line.xml',
],
'installable': True,
'application': False,
'auto_install': False,
}
4 changes: 2 additions & 2 deletions sale_product_set/tests/test_product_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
from odoo.tests import common


class test_product_set(common.TransactionCase):
class TestProductSet(common.TransactionCase):
""" Test Product set"""

def setUp(self):
super(test_product_set, self).setUp()
super(TestProductSet, self).setUp()
self.sale_order = self.env['sale.order']
self.product_set_add = self.env['product.set.add']

Expand Down
11 changes: 4 additions & 7 deletions sale_product_set/views/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/div[@class='oe_title']/h1" position="before">
<div class="oe_right oe_button_box">
<button class="oe_inline oe_stat_button"
<xpath expr="//header" position="inside">
<button class="btn-primary"
type="action"
name="%(act_open_wizard_product_set_add)d"
icon="fa-cubes"
attrs="{'invisible': [('state','not in',('draft','sent'))]}"
groups="base.group_user">
<div>Add set</div>
</button>
</div>
groups="base.group_user"
string="Add set"/>
</xpath>
</field>
</record>
Expand Down
1 change: 0 additions & 1 deletion sale_product_set/wizard/product_set_add.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<footer>
<button name="add_set" string="Add set"
type="object" class="oe_highlight"/>
or
<button special="cancel" string="Cancel" class="oe_link"/>
</footer>
</form>
Expand Down

0 comments on commit 472ecaf

Please sign in to comment.