-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][ADD] account journal display type #206
base: 14.0
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops you're right, sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.