[19.0][MIG] purchase_landed_cost: Migration to version 19.0#3033
Open
Andrii9090-tecnativa wants to merge 59 commits intoOCA:19.0from
Open
[19.0][MIG] purchase_landed_cost: Migration to version 19.0#3033Andrii9090-tecnativa wants to merge 59 commits intoOCA:19.0from
Andrii9090-tecnativa wants to merge 59 commits intoOCA:19.0from
Conversation
… real cost method is selected, and quant cost price adjustment
…ase orders and pickings
…he cast price includind landed costs
Invoice currency is NOT being used to convert to landed cost currency. Currently it takes company currency and converts to landed cost currency, so if invoice is in different currency, amount is wrong.
Now the model is different. account.invoice > account.move account.invoice.line > account.move.line Inverse name: `move_id`, not `invoice_id` Fixes OCA#1248
… have any purchase permission.
Currently translated at 100.0% (138 of 138 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_landed_cost Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_landed_cost/es/
Currently translated at 42.0% (58 of 138 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_landed_cost Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_landed_cost/it/
Currently translated at 100.0% (138 of 138 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_landed_cost Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_landed_cost/it/
Currently translated at 100.0% (138 of 138 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_landed_cost Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_landed_cost/pt_BR/
Using `read` for bringing act_window values requires super-admin access. Let's use `_for_xml_id` instead that is a method specially for that. TT117299
Since odoo/odoo@d0342c8, the default existing company is not getting a CoA automatically, provoking than the current tests fail with the error: odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale Thus, we put tests post-install for being sure localization modules are installed, the same as AccountTestInvoicingCommon does, but we don't inherit from it, as it creates an overhead creating 2 new companies and loading their CoA and some more stuff, while we don't need all of that. Besides, if you don't have `l10n_generic_coa` installed, you can't use another CoA (like `l10n_es`) easily, so we put little code to select the first available CoA.
c79b932 to
a5e9d56
Compare
Member
|
/ocabot migration purchase_landed_cost |
pedrobaeza
reviewed
Apr 30, 2026
| _description = "Purchase cost type" | ||
|
|
||
| name = fields.Char(required=True, translate=True, index=True) | ||
| name = fields.Char(required=True, translate=True, index="trigram") |
Member
There was a problem hiding this comment.
Don't change this index, as we don't need similar searches.
| res = super().default_get(fields_list) | ||
| if "possible_picking_ids" in fields_list: | ||
| expenses = self.env["purchase.cost.distribution.expense"].search([]) | ||
| expenses = self.env["purchase.cost.distribution.expense"].browse() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration to 19.0
@pedrobaeza @victoralmau can you review please?
@Tecnativa
TT61958