コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2917 ビュー
        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?

アバター
破棄
関連投稿 返信 ビュー 活動
1
6月 24
1326
1
6月 24
4772
0
1月 24
1724
0
11月 23
1934
0
5月 23
2696