-
-
Notifications
You must be signed in to change notification settings - Fork 748
[9.0][IMP] product: migrate simple purchase pricelists #2736
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: 9.0
Are you sure you want to change the base?
Conversation
select | ||
partner_id, min_quantity, currency_id, p2i.date_start, p2i.date_end, | ||
p2i.company_id, p2i.product_id, p2i.product_tmpl_id, | ||
coalesce(pt1.%(field_name)s, pt2.%(field_name)s) * |
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.
In case %(field_name)s
is standard_price
(and this should be the only case IMO) we should take in consideration that in V9 standard_price
is a property of product.product
(and not of product.template
).
To retrieve the proper product prices this should work:
select
split_part(res_id, ',', 2)::int product_id,
value_float amount,
company_id
from ir_property
where
fields_id in (
select res_id from ir_model_data
where name like 'field_product_product_standard_price'
) and res_id is not null and value_float is not null
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.
thanks for your input, the moving of the property to product.product happens indeed before this happens. Now this should be finr
52f9244
to
a0dd0d5
Compare
e4c6cbc
to
61a3bc5
Compare
@hbrunn given that we had something of a flood of vendor prices after the migration, there may be room for improvement. |
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr