Skip to content

Conversation

@victoralmau
Copy link
Member

@victoralmau victoralmau commented Nov 12, 2025

Migration to 18.0 + separate rma_repair into rma_repair_lot to avoid such a hard dependency (rma_lot).

Please @pilarvargas-tecnativa and @christian-ramos-tecnativa can you review it?

@Tecnativa TT57882

@victoralmau
Copy link
Member Author

I think the rma_lot dependency in

action["context"]["default_lot_id"] = self.lot_id.id
is too strict (especially because of the dependencies that rma_lot has), so I can think of different possibilities:

  • Do not add rma_lot as a dependency of rma_repair and if the lot_id field exists, define its value.
  • Do not add rma_lot as a dependency of rma_repair and add an extra module (rma_repair_lot, for example) to add only that case.

What do you think, @pedrobaeza ?

@pedrobaeza
Copy link
Member

I would go for an extra module.

@pedrobaeza
Copy link
Member

/ocabot migration rma_repair

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Nov 12, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 12, 2025
5 tasks
@victoralmau
Copy link
Member Author

I would go for an extra module.

On second thought, I don't think it's worth the effort to separate that part into a new module just for two lines of code. In the future, the separation will have to be justified, and anyone using this module in previous versions would not be able to use it and would have to add the new one.

In any case, it will be added to the ROADMAP.

@sbejaoui
Copy link
Contributor

can you include these two commits please:

@christian-ramos-tecnativa

action["context"]["default_lot_id"] = self.lot_id.id

IMO if this is the only reason to add rma_lot to the dependencies I would prefer checking if the field exists directly, as @victoralmau said, rma_lot adds many modules from stock-logistics-workflow unnecessary if you don't work with lots.

@victoralmau victoralmau force-pushed the 18.0-mig-rma_repair branch 3 times, most recently from 98815fb to c88e8c6 Compare November 18, 2025 13:52
@victoralmau victoralmau changed the title [18.0][MIG] rma_repair: Migration to 18.0 [18.0][MIG] rma_repair + rma_repair_lot: Migration to 18.0 Nov 18, 2025
@victoralmau
Copy link
Member Author

FWP of changes #503 (comment) created at 17.0: #507

Commits added from 17.0 (#507) to this PR

Separated the rma_lot part into a new rma_repair_lot module to avoid that hard dependency

@christian-ramos-tecnativa

Shouldn't be rma_repair_lot autoinstalable?

@victoralmau
Copy link
Member Author

rma_repair_lot

I'm not sure about auto-install. What do you think, @pedrobaeza ?

@pedrobaeza
Copy link
Member

Yeah, it sounds correct.

Copy link

@christian-ramos-tecnativa christian-ramos-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

peluko00 and others added 6 commits December 12, 2025 13:46
[UPD] Update rma_repair.pot

[BOT] post-merge updates
Translated using Weblate (Italian)

Currently translated at 100.0% (7 of 7 strings)

Translation: rma-17.0/rma-17.0-rma_repair
Translate-URL: https://translation.odoo-community.org/projects/rma-17-0/rma-17-0-rma_repair/it/
…receipt

- align repair creation with other operation-level actions via new `action_create_repair` field:
  - manual_on_confirm
  - manual_after_receipt
  - automatic_on_confirm
  - automatic_after_receipt

- add `can_be_repaired` to control repair button visibility
- extend confirm and receipt flows to support automatic repair creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants