Skip to content

Commit

Permalink
Merge PR #820 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by sbidoul
  • Loading branch information
OCA-git-bot committed Jul 30, 2019
2 parents 5233f06 + 3ea2efe commit ec1d6b8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sale_product_set/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'category': 'Sale',
'license': 'AGPL-3',
'author': 'Anybox, Odoo Community Association (OCA)',
'version': '12.0.1.0.0',
'version': '12.0.1.1.0',
'website': 'https://github.com/OCA/sale-workflow',
'summary': "Sale product set",
'depends': [
Expand Down
6 changes: 6 additions & 0 deletions sale_product_set/i18n/sale_product_set.pot
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_product_set
#: model:ir.model.fields,field_description:sale_product_set.field_product_set__active
#: model:ir.model.fields,field_description:sale_product_set.field_product_set_line__active
msgid "Active"
msgstr ""

#. module: sale_product_set
#: model_terms:ir.ui.view,arch_db:sale_product_set.product_set_add_form_view
#: model_terms:ir.ui.view,arch_db:sale_product_set.view_order_stock_form
Expand Down
1 change: 1 addition & 0 deletions sale_product_set/models/product_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class ProductSet(models.Model):
_description = 'Product set'

name = fields.Char(help='Product set name', required=True)
active = fields.Boolean(string="Active", default=True)
ref = fields.Char(
string='Internal Reference',
help='Product set internal reference',
Expand Down
6 changes: 6 additions & 0 deletions sale_product_set/models/product_set_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ class ProductSetLine(models.Model):
string='Set',
ondelete='cascade',
)
active = fields.Boolean(
string="Active",
related="product_set_id.active",
store=True,
readonly=True,
)
sequence = fields.Integer(
string='Sequence',
required=True,
Expand Down
7 changes: 7 additions & 0 deletions sale_product_set/views/product_set.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<field name="arch" type="xml">
<form string="Product set">
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" type="object"
name="toggle_active" icon="fa-archive">
<field name="active" widget="boolean_button"
options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
</button>
</div>
<group>
<field name="name" select="1"/>
<field name="ref"/>
Expand Down

0 comments on commit ec1d6b8

Please sign in to comment.