-
-
Notifications
You must be signed in to change notification settings - Fork 429
[18.0][ADD] account_move_analytic: Analytic distribution at invoice and bill level #864
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
base: 18.0
Are you sure you want to change the base?
Conversation
| /> | ||
| </field> | ||
| <field name="invoice_line_ids" position="attributes"> | ||
| <attribute name="context" operation="update"> |
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.
Not sure why, But I get an error when installing it on runboat
`Invalid attributes 'operation' in element
View error context:
{'file': '/mnt/data/odoo-addons-dir/account_move_analytic/views/account_move_views.xml',
'line': 1,
'name': 'account.move.form - Account Move Analytic',
'view': ir.ui.view(886,),
'view.model': 'account.move',
'view.parent': ir.ui.view(682,),
'xmlid': 'view_move_form_analytic'}`
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.
It is missing base_view_inheritance_extension dependency, Thank you @AaronHForgeFlow
24df8ca to
193e1d2
Compare
AaronHForgeFlow
left a comment
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.
Functional review 👍
| ) | ||
|
|
||
| @api.onchange("analytic_distribution") | ||
| def _onchange_analytic_distribution(self): |
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.
@JoanSForgeFlow analytic_distribution on lines is a stored field. Why not overriding compute method instead ?
| break | ||
| move.analytic_distribution = first_distribution | ||
|
|
||
| def _inverse_analytic_distribution(self): |
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.
Same comment as here under
56f3b26 to
43cb47a
Compare
43cb47a to
723990a
Compare
|
Hi @rousseldenis: Thanks for the feedback! I've refactored the code:
The Let me know if this looks good. Thank you! |
Adds analytic distribution support on invoices and vendor bills by syncing the analytic distribution with the invoice lines.