Skip to content

Commit

Permalink
Fix bug when both use_create_lots and use_existing_lots are enabled o…
Browse files Browse the repository at this point in the history
…n the picking type

Update FR translation
  • Loading branch information
alexis-via committed Sep 16, 2019
1 parent 39da68e commit 74c108f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 75 deletions.
56 changes: 0 additions & 56 deletions product_expiry_simple/i18n/fr.po

This file was deleted.

6 changes: 5 additions & 1 deletion product_expiry_simple/models/stock_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ class StockMoveLine(models.Model):
def _action_done(self):
super(StockMoveLine, self)._action_done()
for rec in self:
if rec.move_id.picking_type_id.use_create_lots and rec.lot_id:
pick_type = rec.move_id.picking_type_id
if (
pick_type.use_create_lots and
not pick_type.use_existing_lots and
rec.lot_id):
rec.lot_id.write({'expiry_date': rec.expiry_date})
34 changes: 17 additions & 17 deletions stock_no_negative/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ msgstr ""
#: code:addons/stock_no_negative/models/stock_quant.py:39
#, python-format
msgid " lot '%s'"
msgstr "lot%s"
msgstr "lot '%s'"

#. module: stock_no_negative
#: model:ir.model.fields,field_description:stock_no_negative.field_product_category__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_product_product__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_product_template__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_stock_location__allow_negative_stock
msgid "Allow Negative Stock"
msgstr "Autoriser le stock n??gatif"
msgstr "Autoriser le stock négatif"

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_product_category__allow_negative_stock
Expand All @@ -40,9 +40,9 @@ msgid ""
"category. The options doesn't apply to products attached to sub-categories "
"of this category."
msgstr ""
"Autorise les niveaux de stock n??gatif pour les articles stockables attach??"
"s ?? cette cat??gorie. Cette option ne s'applique pas aux articles attach??"
"s ?? des sous-cat??gories de cette cat??gorie."
"Autorise les niveaux de stock négatif pour les articles stockables attachés "
"à cette catégorie. Cette option ne s'applique pas aux articles attachés "
"à des sous-catégories de cette catégorie."

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_stock_location__allow_negative_stock
Expand All @@ -51,9 +51,9 @@ msgid ""
"Allow negative stock levels for the stockable products attached to this "
"location."
msgstr ""
"Autorise les niveaux de stock n??gatif pour les articles stockables attach??"
"s ?? cette cat??gorie. Cette option ne s'applique pas aux articles attach??"
"s ?? des sous-cat??gories de cette cat??gorie."
"Autorise les niveaux de stock négatif pour les articles stockables attachés "
"à cette catégorie. Cette option ne s'applique pas aux articles attachés "
"à des sous-catégories de cette catégorie."

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_product_product__allow_negative_stock
Expand All @@ -64,10 +64,10 @@ msgid ""
"stock moves will be blocked if the stock level becomes negative with the "
"stock move."
msgstr ""
"Si cette option n'est pas activ??e sur cet article ni sur la cat??gorie ?? "
"laquelle il est rattach?? et que cet article est un produit stockable, alors "
"la validation des mouvements de stock sera bloqu??e si le niveau de stock "
"devient n??gatif avec ce mouvement de stock."
"Si cette option n'est pas activée sur cet article ni sur la catégorie à "
"laquelle il est rattaché et que cet article est un produit stockable, alors "
"la validation des mouvements de stock sera bloquée si le niveau de stock "
"devient négatif avec ce mouvement de stock."

#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_stock_location
Expand All @@ -77,12 +77,12 @@ msgstr ""
#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_product_category
msgid "Product Category"
msgstr "Cat??gorie d'articles"
msgstr "Catégorie d'articles"

#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_product_template
msgid "Product Template"
msgstr "Mod??le d'article"
msgstr "Modèle d'article"

#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_stock_quant
Expand All @@ -97,6 +97,6 @@ msgid ""
"product '%s'%s would become negative (%s) on the stock location '%s' and "
"negative stock is not allowed for this product and/or location."
msgstr ""
"Impossible de valider cette op??ration car le niveau de stock de ce produit "
"%s'%s deviendrait n??gative(%s) dans l'emplacement du stock '%s'. Un stock "
"n??gatif n'est pas permis pour ce produit."
"Impossible de valider cette opération car le niveau de stock de cet article "
"'%s'%s deviendrait négatif (%s) sur l'emplacement de stock '%s'. Un stock "
"négatif n'est pas permis pour cet article."
2 changes: 1 addition & 1 deletion stock_no_negative/views/product_product_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<field name="model">product.template</field>
<field name="inherit_id" ref="stock.view_template_property_form" />
<field name="arch" type="xml">
<field name="categ_id" position="after">
<field name="route_from_categ_ids" position="after">
<field name="allow_negative_stock"
attrs="{'invisible': [('type', '!=', 'product')]}"/>
</field>
Expand Down

0 comments on commit 74c108f

Please sign in to comment.