issue12583.diff [stock_lot] Missing search function in default_uom field in stock.lot model
This commit is contained in:
parent
43441b4c1e
commit
c9d4019390
|
@ -0,0 +1,25 @@
|
|||
diff --git a/tryton/modules/stock_lot/stock.py b/tryton/modules/stock_lot/stock.py
|
||||
index 3e93c4e57c..734018dbe8 100644
|
||||
--- a/tryton/modules/stock_lot/stock.py
|
||||
+++ b/tryton/modules/stock_lot/stock.py
|
||||
@@ -78,7 +78,7 @@ class Lot(DeactivableMixin, ModelSQL, ModelView, LotMixin, StockMixin):
|
||||
'get_quantity', searcher='search_quantity')
|
||||
default_uom = fields.Function(
|
||||
fields.Many2One('product.uom', "Default UOM"),
|
||||
- 'on_change_with_default_uom')
|
||||
+ 'on_change_with_default_uom', searcher='search_default_uom')
|
||||
default_uom_digits = fields.Function(fields.Integer("Default Unit Digits"),
|
||||
'on_change_with_default_uom_digits')
|
||||
|
||||
@@ -152,6 +152,11 @@ class Lot(DeactivableMixin, ModelSQL, ModelView, LotMixin, StockMixin):
|
||||
def downward_traces(cls, lots):
|
||||
pass
|
||||
|
||||
+ @classmethod
|
||||
+ def search_default_uom(cls, name, clause):
|
||||
+ nested = clause[0][len(name):]
|
||||
+ return [('product.' + name + nested, *clause[1:])]
|
||||
+
|
||||
|
||||
class LotTrace(ModelSQL, ModelView):
|
||||
"Lot Trace"
|
2
series
2
series
|
@ -103,3 +103,5 @@ issue12497.diff # [purchase] Use the last 10 purchases to set default currency,
|
|||
merge_request779.diff # [account_payment] Warn when submitting, approving or proceeding payment with reconciled line
|
||||
|
||||
merge_request775.diff # [sao] Set visibility of active button when screen is displayed
|
||||
|
||||
issue12583.diff # [stock_lot] Missing search function in default_uom field in stock.lot model
|
||||
|
|
Loading…
Reference in New Issue