Skip to content
Permalink
Browse files

[ADD] add new field available product qty

  • Loading branch information...
Gabbasov Dinar
Gabbasov Dinar committed Aug 7, 2019
1 parent 25ef9d4 commit 5351db2073c3aca0c031d0580a3ae1035f764b0f
Showing with 14 additions and 3 deletions.
  1. +13 −3 pos_wechat_miniprogram/models/product.py
  2. +1 −0 pos_wechat_miniprogram/views/product_view.xml
@@ -6,6 +6,16 @@
class ProductTemplate(models.Model):
_inherit = 'product.template'

hot_product = fields.Boolean(string='Hot Product', help='Check if you this product is hot product (promotion)',
default=False)
banner = fields.Binary(string='Hot product banner', attachment=True)
hot_product = fields.Boolean(
string='Hot Product',
help='Check if you this product is hot product (promotion)',
default=False
)
banner = fields.Binary(
string='Hot product banner',
attachment=True
)
available_pos_product_qty = fields.Integer(
string='Available Products',
default=1,
)
@@ -9,6 +9,7 @@
<field name="arch" type="xml">
<field name="to_weight" position="after">
<field name="available_in_pos"/>
<field name="available_pos_product_qty" attrs="{'invisible': [('available_in_pos', '=', False)]}"/>
<field name="hot_product" attrs="{'invisible': [('available_in_pos', '=', False)]}"/>
<field name="banner" widget="image" class="oe_miniprogram_banner" options="{'size': [320, 150]}" attrs="{'invisible': ['|', ('available_in_pos', '=', False), ('hot_product', '=', False)]}"/>
</field>

0 comments on commit 5351db2

Please sign in to comment.
You can’t perform that action at this time.