[18.0][ADD] account_move_analytic: Analytic distribution at invoice and bill level#864
[18.0][ADD] account_move_analytic: Analytic distribution at invoice and bill level#864JoanSForgeFlow wants to merge 1 commit intoOCA:18.0from
Conversation
| /> | ||
| </field> | ||
| <field name="invoice_line_ids" position="attributes"> | ||
| <attribute name="context" operation="update"> |
There was a problem hiding this comment.
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.
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.
Functional review 👍
| ) | ||
|
|
||
| @api.onchange("analytic_distribution") | ||
| def _onchange_analytic_distribution(self): |
There was a problem hiding this comment.
@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.
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.