[FIX] point_of_sale: Fix initial balance for bank type
The balance start should only be set with the ending balance of the
previous session when journal type is 'cash'. When the journal type
is 'bank', it must be 0.
Fine tuning of this commit: 46d0b461cd
opw:1981984
closes odoo/odoo#34735
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
committed by
Goffin Simon
parent
0eee7c68ff
commit
6d9fdb643d
@@ -209,7 +209,7 @@ class PosSession(models.Model):
|
||||
'journal_id': journal.id,
|
||||
'user_id': self.env.user.id,
|
||||
'name': pos_name,
|
||||
'balance_start': self.env["account.bank.statement"]._get_opening_balance(journal.id)
|
||||
'balance_start': self.env["account.bank.statement"]._get_opening_balance(journal.id) if journal.type == 'cash' else 0
|
||||
}
|
||||
|
||||
statements.append(ABS.with_context(ctx).sudo(uid).create(st_values).id)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
France, 2019-07-04
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Valérian Dorcy valerian.dorcy@gmail.com https://github.com/dorcyv
|
||||
Reference in New Issue
Block a user