-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
7.0 sales analysis reporting in base currency #25
7.0 sales analysis reporting in base currency #25
Conversation
sales_analysis_reporting_in_base_currency - sales_analysis_reporting_in_base_currency_inherited - sales_analysis_converting_sale_order_line_in_base_currency
The editor open a form view. We have to add an invisible field to catch the on change events. Also added a total converted to the form view.
It might not be a good idea to store the fields yet. Stored fields are computed only once and have to be recalculated.
@llacroix Can you please add some tests? |
ok |
@@ -0,0 +1,89 @@ | |||
from openerp import tools |
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.
Copyright?
8678153
to
cf235d9
Compare
_inherit = 'sale.order.line' | ||
|
||
_columns = { | ||
"order_line_currency": fields.many2one( |
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.
@llacroix It's not mandatory but I would go with the name currency_id. We know that we are in the order line so the order-line_;
prefix is not that relevant and since it's many2one it's more clear to have the _id
suffix.
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.
Alright. I'm good with currency_id too
😄 |
1 similar comment
Maxed the coverage. |
1 similar comment
Even if the rounding for subtotal is set to two while price unit is 5, OpenERP will keep 5 digits everywhere until it gets to the database or the view. For this reason, we have to do roundings by ourselves in some places. In this case, OpenERP seems to be summing the rounded subtotals instead of doing a sum on all lines and then rounding.
40129a5
to
fc12487
Compare
1 similar comment
Hi @llacroix
Shouldn't this be fixed in the core module? |
{ | ||
'name': 'sales Analysis converting sale order line in base currency', | ||
'version': '0.1', | ||
'author': 'Savoir-faire Linux', |
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.
add Odoo Community Association (OCA)
@eLBati It's been a long time... Obviously it should be fixed in the core modules but that would also mean that queries would be probably much more complicated than "fetch" and "show". |
@llacroix I made something similar for invoice analysis: odoo/odoo#7550 |
This is very old and without further activity, so I'm closing. If you are still interested in this, feel free to reopen it. |
No description provided.