Allow stock lot to be deactivated

Closes #11931
This commit is contained in:
Cédric Krier
2022-12-25 11:08:04 +01:00
parent 468ca93e07
commit fcd4b4f1f0
5 changed files with 11 additions and 2 deletions
+1
View File
@@ -1,3 +1,4 @@
* Allow stock lot to be deactivated
* Do not copy number of lot with sequence
Version 6.6.0 - 2022-10-31
+3 -2
View File
@@ -8,7 +8,8 @@ from sql import Column
from sql.functions import CharLength
from trytond.i18n import gettext
from trytond.model import Index, Model, ModelSQL, ModelView, fields
from trytond.model import (
DeactivableMixin, Index, Model, ModelSQL, ModelView, fields)
from trytond.model.exceptions import (
AccessError, RequiredValidationError, ValidationError)
from trytond.modules.stock import StockMixin
@@ -73,7 +74,7 @@ class LotMixin:
return bool(self.product.lot_sequence)
class Lot(ModelSQL, ModelView, LotMixin, StockMixin):
class Lot(DeactivableMixin, ModelSQL, ModelView, LotMixin, StockMixin):
"Stock Lot"
__name__ = 'stock.lot'
_rec_name = 'number'
+5
View File
@@ -4,6 +4,11 @@ this repository contains the full copyright notices and license terms. -->
<form>
<label name="number"/>
<field name="number"/>
<group col="-1" colspan="2" id="checkboxes">
<label name="active"/>
<field name="active" xexpand="0" width="25"/>
</group>
<label name="product"/>
<field name="product"/>
+1
View File
@@ -3,6 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/field[@name='product']" position="after">
<newline/>
<label name="shelf_life_expiration_date"/>
<field name="shelf_life_expiration_date"/>
<label name="expiration_date"/>
+1
View File
@@ -3,6 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="//field[@name='product']" position="after">
<newline/>
<label name="unit"/>
<field name="unit"/>
<label name="unit_quantity"/>