Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tryton
Tryton
Commits
2b3e28bed991
Commit
2b3e28be
authored
Dec 25, 2022
by
Cédric Krier
Browse files
Allow stock lot to be deactivated
Closes
#11931
parent
74cad8cf1dbe
Pipeline
#60091
failed with stages
in 15 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/stock_lot/CHANGELOG
View file @
2b3e28be
* Allow stock lot to be deactivated
* Do not copy number of lot with sequence
Version 6.6.0 - 2022-10-31
...
...
modules/stock_lot/stock.py
View file @
2b3e28be
...
...
@@ -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'
...
...
modules/stock_lot/view/lot_form.xml
View file @
2b3e28be
...
...
@@ -4,6 +4,11 @@
<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"
/>
...
...
modules/stock_lot_sled/view/lot_form.xml
View file @
2b3e28be
...
...
@@ -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"
/>
...
...
modules/stock_lot_unit/view/lot_form.xml
View file @
2b3e28be
...
...
@@ -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"
/>
...
...
Write
Preview
Supports
Markdown
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