Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odoo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
odoo
Commits
d5e94325
Commit
d5e94325
authored
Dec 17, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1929: Add minimal stock attribute to product.template
parent
30a27535
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
1 deletions
+38
-1
__openerp__.py
lacagette_addons/cagette_product/__openerp__.py
+2
-1
fr.po
lacagette_addons/cagette_product/i18n/fr.po
+18
-0
product_template.py
lacagette_addons/cagette_product/models/product_template.py
+2
-0
product_template.xml
lacagette_addons/cagette_product/views/product_template.xml
+16
-0
No files found.
lacagette_addons/cagette_product/__openerp__.py
View file @
d5e94325
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
],
],
'data'
:
[
'data'
:
[
'static/src/xml/templates.xml'
,
'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'
],
'qweb'
:
[
'static/src/xml/label_print_button.xml'
],
'installable'
:
True
,
'installable'
:
True
,
...
...
lacagette_addons/cagette_product/i18n/fr.po
0 → 100644
View file @
d5e94325
# 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"
lacagette_addons/cagette_product/models/product_template.py
View file @
d5e94325
...
@@ -27,6 +27,8 @@ import math
...
@@ -27,6 +27,8 @@ import math
class
ProductTemplate
(
models
.
Model
):
class
ProductTemplate
(
models
.
Model
):
_inherit
=
"product.template"
_inherit
=
"product.template"
minimal_stock
=
fields
.
Integer
(
string
=
"Minimal stock"
)
@api.constrains
(
'barcode'
)
@api.constrains
(
'barcode'
)
def
_check_barcode
(
self
):
def
_check_barcode
(
self
):
""" Vérification du code barre avant de sauvegarder une fiche article"""
""" Vérification du code barre avant de sauvegarder une fiche article"""
...
...
lacagette_addons/cagette_product/views/product_template.xml
0 → 100644
View file @
d5e94325
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment