Commit d5e94325 by François C.

#1929: Add minimal stock attribute to product.template

parent 30a27535
......@@ -33,7 +33,8 @@
],
'data': [
'static/src/xml/templates.xml',
'data/ir_config_parameter_data.xml'
'data/ir_config_parameter_data.xml',
'views/product_template.xml',
],
'qweb': ['static/src/xml/label_print_button.xml'],
'installable': True,
......
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * cagette_product
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo 9.0\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: cagette_product
#: model:ir.model.fields,field_description:cagette_product.field_product_template_minimal_stock
msgid "Minimal stock"
msgstr "Stock minimum"
......@@ -27,6 +27,8 @@ import math
class ProductTemplate(models.Model):
_inherit = "product.template"
minimal_stock = fields.Integer(string="Minimal stock")
@api.constrains('barcode')
def _check_barcode(self):
""" Vérification du code barre avant de sauvegarder une fiche article"""
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_lacagette_product_product" model="ir.ui.view">
<field name="name">template.minimal.stock.form</field>
<field name="model">product.template</field>
<field eval="7" name="priority"/>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<group name="group_lots_and_weight" position="inside">
<field name="minimal_stock" />
</group>
</field>
</record>
</odoo>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment