[14.0][ADD] account journal display type#206
Conversation
8eee407 to
c89f1b7
Compare
| "Select 'Cash' or 'Bank' for journals that are used in customer or vendor payments.\n" | ||
| "Select 'General' for miscellaneous operations journals.", | ||
| ) | ||
| type = fields.Selection(compute="_compute_type", store=True) |
There was a problem hiding this comment.
type is python builtin and then shouldn't be used as a variable : you may use type_ or kind
There was a problem hiding this comment.
the type is define in odoo core, the goal is to redefine this field to handle "payment" journal as type "bank" without useless account reference (default_account_id will have the same value as payment_debit_account_id).
If display type is payment, payment_debit_account_id and payment_credit_account_id are sufficient required fields.
If display type is cash, the only field we keep is default_account_id. the payment config tabs is useless for a cash journal. (in this case payment_debit_account_id and payment_credit_account_id are set with value of default_account_id)
https://github.com/OCA/OCB/blob/14.0/addons/account/models/account_account.py#L13
bealdav
left a comment
There was a problem hiding this comment.
Could you make a readme to define what is the advantage to have this type. Use case
0b01997 to
a5b2f74
Compare
Add a new display type in journal_account to handle the payment type without useless account to define.