-
-
Notifications
You must be signed in to change notification settings - Fork 698
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
[15.0][MIG] stock_picking_invoicing: Migration to 15.0 #1452
[15.0][MIG] stock_picking_invoicing: Migration to 15.0 #1452
Conversation
cf998cc
to
62bcc20
Compare
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.
Tested it and it works as expected :)
Nevertheless I question the necessity of computing some invoice & invoice lines values because they are also computed by odoo. I tried to comment them and the generated invoice was the same.
values.update( | ||
{ | ||
"invoice_origin": ", ".join(pickings.mapped("name")), | ||
"user_id": self.env.user.id, | ||
"partner_id": partner_id, | ||
"invoice_payment_term_id": payment_term, | ||
"move_type": inv_type, | ||
"fiscal_position_id": partner.property_account_position_id.id, | ||
"company_id": company.id, | ||
"currency_id": currency.id, | ||
"journal_id": journal.id, | ||
"picking_ids": [(4, p.id, False) for p in pickings], | ||
} | ||
) |
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.
What is the idea behind defining user_id, invoice_payment_term_id, fiscal_position_id and company_id because those fields are already computed by odoo with the onchange ?
values.update( | ||
{ | ||
"name": name, | ||
"account_id": account.id, | ||
"product_id": product.id, | ||
"product_uom_id": product.uom_id.id, | ||
"quantity": quantity, | ||
"price_unit": price, | ||
"tax_ids": [(6, 0, taxes.ids)], | ||
"move_line_ids": move_line_ids, | ||
"move_id": invoice.id, | ||
} | ||
) |
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 before : account_id, product_uom_id and tax_ids are already computed by odoo onchange.
0cbb817
to
d8cf1b9
Compare
Thanks @jguenat for review, I removed the fields pointed and included in the tests to check if those fields are filled, to be able to check Fiscal Position was need to included a simple demo data. The errors in the tests are not related with this module, the problem came from recently update in v15 and affect modules in this repo
2023-05-11 14:27:14,545 254 ERROR odoo odoo.addons.sale_timesheet_invoice_description.tests.test_sale_timesheet_description: FAIL: TestSaleTimesheetDescription.test_three_timesheets_same_date_split I'm trying to understand the problem, it's seems a rounding error, but I'm not sure if it can be ignored and we should just change the value for 1.29, any idea to solve will be appreciated. |
* Loading * Onchanges Etc
* Good Price with pricelist * Good Taxes * group works * Everything is filtered with company
* Get the correct taxes and account regarding Fiscal Position
Currently translated at 100.0% (46 of 46 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-stock_picking_invoicing Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-stock_picking_invoicing/pt_BR/
…tion of Invoice and check if those fields are being filled.
d8cf1b9
to
76f2c30
Compare
This PR has the |
/ocabot migration stock_picking_invoicing |
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at c7fd954. Thanks a lot for contributing to OCA. ❤️ |
Standard migration of stock_picking_invoicing module, #1022
cc @rvalyi @renatonlima