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
[16.0] account_invoice_supplierinfo_update: fix updating the right supplierinfo #1697
base: 16.0
Are you sure you want to change the base?
[16.0] account_invoice_supplierinfo_update: fix updating the right supplierinfo #1697
Conversation
Hi @legalsylvain, |
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.
Nice catch !
Thanks !
(I personnaly don't use many supplier info for the same product and partner, so I never faced such issue).
( | ||
0, | ||
0, |
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.
nitpicking, could be replaced by Command.create
( | ||
6, | ||
0, |
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 here ( Command.set([...]))
lambda seller: seller.partner_id == self.move_id.supplier_partner_id | ||
supplierinfos = self.product_id._select_seller( | ||
partner_id=self.move_id.supplier_partner_id, | ||
quantity=self.quantity, |
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.
"Information is a mass noun. It has no plural form"* so infos looks like informations which would be Frenglish and looks TinyERP. Better change that to supplier_info or supplier_data as you want.
- https://preply.com/en/question/plural-of-information
#onestpasamiserieux
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.
Hi.
@rvalyi. We already talk about that in another PR. summary of the previous comments :
what you mention is not an OCA rule.
- "infos" is used in many OCA repo. (12 occurences in V16, only in the repos I cloned for GRAP project)
- "datas" is used in many OCA repo. (19 occurences in V16, only in the repos I cloned for GRAP project)
So if you want to introduce that new rule, please create a dedicated PR here https://github.com/OCA/odoo-community.org/tree/master/website/Contribution
In the meantime, please avoid to block valid PR.
Thanks !
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.
I didn't block, only suggest to use better variable names. When native English speakers read that they feel it's cheap while it's easy to improve.
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.
I didn't block
You set "changes requested". Could you remove it ?
- as said not the place to create new rules. Please create a dedicated issue.
Thanks !
If you have variant of price per qty the module is not going to update the right supplierinfo
Reuse the native _sellect_seller to pick the right supplierinfo + add test
@legalsylvain