Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2930 Ansichten
        for cash_journal in cash_payment_methods.mapped('cash_journal_id'):
ctx['journal_id'] = cash_journal.id if pos_config.cash_control and cash_journal.type == 'cash' else False
st_values = {
'journal_id': cash_journal.id,
'user_id': self.env.user.id,
'name': pos_name,
'balance_start': self.env["account.bank.statement"]._get_opening_balance(cash_journal.id) if cash_journal.type == 'cash' else 0
}
statement_ids |= statement_ids.with_context(ctx).create(st_values)

values.update({
'name': pos_name,
'statement_ids': [(6, 0, statement_ids.ids)],
'config_id': config_id,
})

if self.user_has_groups('point_of_sale.group_pos_user'):
res = super(PosSession, self.with_context(ctx).sudo()).create(values)
else:
res = super(PosSession, self.with_context(ctx)).create(values)

Why it is not creating bank statement for Bank Journal? Is there any reason for this?

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juni 24
1338
1
Juni 24
4798
0
Jan. 24
1738
0
Nov. 23
1940
0
Mai 23
2707