Repository navigation
Conversation
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
the commit history doesn't look correct here. I can see commits from purchase_requisition_tier_validation that seem unrelated to purchase_stock_tier_validation module.
|
You shouldn't add the AI agent as a co-author. It should be mentioned as assisted by AI according to the OCA AI policy: https://github.com/OCA/.github/blob/master/AI_POLICY.md |
|
@yordyl |
f144a05 to
da72e22
Compare
|
@bosd @BhaveshHeliconia Thank you for your comments. This should fix the problems you noted :) |
@yordyl Sadly, no, as the AI removed all the commits and kept only the migration one. |
You need to keep the commit history on top of the migration commit. |
…alidate when procuring
Module last existed at 16.0 in OCA/purchase-workflow and was never carried forward through the 17.0 migration. Relocated alongside its sibling *_tier_validation modules, now living in OCA/tier-validation. _make_po_get_domain (purchase_stock's StockRule hook) and the review_ids field from base_tier_validation are both unchanged in 19.0, so the module logic still applies as-is. Changes: - version bumped to 19.0.1.0.0 - website/links point at OCA/tier-validation (new home) - README regenerated from readme/*.md fragments - pyproject.toml added (whool build backend) - tests modernized: BaseCommon + new_test_user, tagged post_install/-at_install - tests fixed for 19.0 core changes: procurement.group no longer exists (Procurement and run() moved to stock.rule), purchase.order.line.product_uom renamed product_uom_id Assisted-by: Claude Sonnet 5.5 Assisted-by: Claude:claude-sonnet-5-5
da72e22 to
7baf0fd
Compare
|
@bosd @BhaveshHeliconia third time's the charm? |
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 16.0\n" | ||
| "Project-Id-Version: Odoo Server 19.0\n" |
There was a problem hiding this comment.
No need to update the version manually; it will be updated automatically by the OCA bot.
There was a problem hiding this comment.
@BhaveshHeliconia thanks. I wasn't sure what you meant here: this line is the Project-Id-Version header of the .pot, generated by Odoo's export, and I haven't changed the manifest version by hand beyond the 19.0.1.0.0 that a [MIG] commit sets. Did you mean the manifest version, or something else in this file?
There was a problem hiding this comment.
@yordyotl Yes, I meant the .pot file itself (purchase_stock_tier_validation/i18n/purchase_stock_tier_validation.pot).
In OCA, .pot files and their headers (Project-Id-Version) are generated and updated automatically by the oca-ci bot post-merge (via automated [UPD] Update <module>.pot commits).
To keep migration PRs minimal and avoid translation/Weblate conflicts, we usually don't include .pot file updates in migration commits. Could you please revert/discard the changes to the .pot file from this PR?
Other than that, the test updates look great! Thanks!
| ) | ||
|
|
||
| # Common models | ||
| cls.test_partner = cls.env["res.partner"].create({"name": "Partner for test"}) |
There was a problem hiding this comment.
| cls.test_partner = cls.env["res.partner"].create({"name": "Partner for test"}) |
No need to create a res.partner record when using BaseCommon, as it is already provided by the base class.
| "name": "Test Scrap Component 1", | ||
| "type": "consu", | ||
| "is_storable": True, | ||
| "route_ids": [(6, 0, [route_buy])], |
There was a problem hiding this comment.
| "route_ids": [(6, 0, [route_buy])], | |
| "route_ids": [Command.set([route_buy])], |
| "is_storable": True, | ||
| "route_ids": [(6, 0, [route_buy])], | ||
| "seller_ids": [ | ||
| (0, 0, {"partner_id": cls.test_partner.id, "price": 20.0}) |
There was a problem hiding this comment.
| (0, 0, {"partner_id": cls.test_partner.id, "price": 20.0}) | |
| Command.create({"partner_id": cls.test_partner.id, "price": 20.0}) |
| ( | ||
| 0, | ||
| 0, |
There was a problem hiding this comment.
| ( | |
| 0, | |
| 0, | |
| Command.create( |
…r and Command Review feedback: reuse the res.partner provided by BaseCommon instead of creating one, and use Command.set/Command.create instead of raw tuples. Assisted-by: Claude Sonnet 5.5
|
@yordydotl squash the last commit into migration commit. |
Migration of
purchase_stock_tier_validationto 19.0.The module last existed at 16.0 (in
OCA/purchase-workflow) and was nevercarried forward through the 17.0 migration there — no deletion commit, it
simply wasn't ported. Its sibling
*_tier_validationmodules were relocatedto
OCA/tier-validationduring the 17.0/18.0 era, so this migration followssuit and lands it here instead of its historical repo.
No functional changes:
_make_po_get_domain(thestock.rulehook thismodule extends) and
review_ids(frombase_tier_validation) are bothunchanged in 19.0, so the module's logic still applies as-is.
Changes beyond the version bump:
19.0.1.0.0, links point at this reporeadme/*.mdfragmentspyproject.tomladded (whoolbuild backend)BaseCommon+new_test_user, taggedpost_install/-at_install(avoids a module-load-order hazard when otherinstalled modules add required fields to
res.partner/res.company)procurement.groupno longer existsas a model (its
Procurementnamedtuple andrun()moved tostock.rule),and
purchase.order.line.product_uomwas renamedproduct_uom_idTested locally: installs cleanly alongside
base_tier_validationandpurchase_tier_validation, test suite green (0 failed, 0 error(s) of 1 tests).Assisted-by: Claude Sonnet 5.5