Reviewers: ,
Please review this at http://codereview.tryton.org/561003/
Affected files:
M move.py
Index: move.py
===================================================================
--- a/move.py
+++ b/move.py
@@ -357,12 +357,14 @@
if not company.currency.is_zero(amount):
cls.raise_user_error('post_unbalanced_move')
for move in moves:
- post_number =
Sequence.get_id(move.period.post_move_sequence.id)
- cls.write([move], {
- 'post_number': post_number,
+ vals = {
'state': 'posted',
'post_date': Date.today(),
- })
+ }
+ if not move.post_number:
+ vals['post_number'] = Sequence.get_id(
+ move.period.post_move_sequence.id)
+ cls.write([move], vals)
@classmethod
@ModelView.button
--
[email protected] mailing list