Commit 2b3e28be authored by Cédric Krier's avatar Cédric Krier
Browse files

Allow stock lot to be deactivated

Closes #11931
parent 74cad8cf1dbe
Pipeline #60091 failed with stages
in 15 seconds
* Allow stock lot to be deactivated
* Do not copy number of lot with sequence
Version 6.6.0 - 2022-10-31
......@@ -8,7 +8,8 @@
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 @@
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'
......@@ -4,6 +4,11 @@
<label name="number"/>
<field name="number"/>
<group col="-1" colspan="2" id="checkboxes">
<label name="active"/>
<field name="active" xexpand="0" width="25"/>
<label name="product"/>
<field name="product"/>
......@@ -3,6 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<xpath expr="/form/field[@name='product']" position="after">
<label name="shelf_life_expiration_date"/>
<field name="shelf_life_expiration_date"/>
<label name="expiration_date"/>
......@@ -3,6 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<xpath expr="//field[@name='product']" position="after">
<label name="unit"/>
<field name="unit"/>
<label name="unit_quantity"/>
Supports Markdown
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