Require cost price for drop move

The continental accounting requires a cost for such moves.

issue11654
review439401003
(grafted from c2158d1ef10a4b87f09a353d5db6ba07dc87a95d)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2022-08-26 17:48:38 +02:00
1 parent 33305d5cf5
commit de533c3642
1 file changed
+5 -3
+5 -3
View File
@@ -471,9 +471,9 @@ class Move(Workflow, ModelSQL, ModelView):
return True
if from_type in {'storage', 'drop'} and to_type == 'customer':
return True
if from_type == 'storage' and to_type == 'supplier':
if from_type in {'storage', 'drop'} and to_type == 'supplier':
return True
if from_type == 'customer' and to_type == 'storage':
if from_type == 'customer' and to_type == {'storage', 'drop'}:
return True
return False
@@ -482,7 +482,9 @@ class Move(Workflow, ModelSQL, ModelView):
from_type = self.from_location.type if self.from_location else None
to_type = self.to_location.type if self.to_location else None
return ((from_type != 'storage' and to_type == 'storage')
or (from_type == 'storage' and to_type != 'storage'))
or (from_type == 'storage' and to_type != 'storage')
or (from_type != 'drop' and to_type == 'drop')
or (from_type == 'drop' and to_type != 'drop'))
@fields.depends('from_location', 'quantity')
def on_change_with_assignation_required(self, name=None):