Skip to content
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

[18.0][MIG] rma_sale: Migration to 18.0 #450

Open
wants to merge 68 commits into
base: 18.0
Choose a base branch
from

Conversation

victoralmau
Copy link
Member

@victoralmau victoralmau commented Feb 14, 2025

Migration to 18.0

Locked by:

Please @chienandalu can you review it?

@Tecnativa TT54264

@pedrobaeza
Copy link
Member

/ocabot migration rma_sale

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Feb 14, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 14, 2025
3 tasks
Ernesto Tejeda and others added 27 commits February 17, 2025 08:05
[UPD] Update rma_sale.pot

[ADD] icon.png
rma_sale 12.0.1.0.1

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/
[FIX] rma: views permissions

Regular users don't have permissions to rma models, so we should avoid
loading views that lead to permission errors.

TT24986

rma_sale 12.0.1.1.0

[FIX] rma_sale: portal permissions

Some operations need to be sudoed to be reachable by the portal user

[UPD] Update rma_sale.pot

rma_sale 12.0.1.1.1

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/

[IMP] rma: teams flow

- If no RMA Team is set, we'll assign a default one to the new RMA.
- A sequence is now used to search for the top team and assign it.
- No default user is assigned when it's not in the context (i.e. portal
rmas).

[UPD] Update rma_sale.pot

rma_sale 12.0.1.2.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/
- Fix thrown error when trying to download a picking from the portal.
- Add the hook method to prepare RMA values ​​from the return pick wizard.
- Add the access rule for portal users.
- Show the portal 'Request RMAs' button on the sales page only to users
related to the sales order.

[UPD] Update rma_sale.pot

rma_sale 12.0.1.3.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/
Currently translated at 81.5% (44 of 54 strings)

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/es/
- Now it's possible to open several RMAs in a sale order from the portal
- A new comment button has been added to allow the portal user to enter
relevant information like serial numbers o issue description.
- If the requested operation isn't set no RMA will be opened
- The RMA product qty is now a numeric control with limits according to
the qty available to return

[FIX] rma,rma_sale: fix linter errors

[UPD] Update rma_sale.pot

rma_sale 12.0.1.4.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/
- Proper dependency is `sale_stock`, not `sale`, as we are using some fields added
  by this module.
- Propagate salesman from sales order when available.

TT25525

rma_sale 12.0.1.4.1
[FIX+IMP] rma: usability

* IMP - Now the description will be an html son we can show rich styles
in the customers report.
* FIX - On locked sale orders it was need to unlock them to be able to open an RMA.
* IMP - Make the description label visible in the backend form so the
user can easily spot it.
* IMP - Added date and deadline filters.
* IMP - Added pending RMAs filter.
* IMP - Added late RMAs filter.
* IMP - Added danger decoration in tree view

rma_sale 12.0.1.5.0

Translated using Weblate (Spanish)

Currently translated at 100.0% (62 of 62 strings)

Translation: rma-12.0/rma-12.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/es/
Fine-tune of 9a25d6, as for one record, the domain is not applied, but the list is
shown.
Currently translated at 100.0% (63 of 63 strings)

Translation: rma-13.0/rma-13.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-13-0/rma-13-0-rma_sale/ro/
Currently translated at 61.9% (39 of 63 strings)

Translation: rma-13.0/rma-13.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-13-0/rma-13-0-rma_sale/nl/
If there are several stock moves with the same product in the picking we
won't be able to make the RMA
When a sale line has a phantom product (mrp kits) the RMA would not be
possible as the wizard couldn't pair the components moves with the
product in the line. With this approach, we can at least return the
spare components of the original kit line.

We also need some hooks to intervine in the main methods, like in
invoicing.
When the user selects an operation, the comment shows up so the customer
doesn't forget to enter his comments
Allow to set the desired shipping address where the goods must be
returned after the RMA is processed.
Lesser fix for creating RMA from website.
Current values will break any custom behaviour because Many2one fields are set using strings instead of integer (IDs).
Lesser fix for sale.order.line.rma.wizard methods.
When method '_prepare_rma_values' was called upon records where field 'picking_id' was empty, Odoo raised a CacheError when trying to access field 'move_id'.
That happened because computed method '_compute_move_id' was not assigning a proper value to such field when 'picking_id' was empty.
Once the computed method is fixed (by simply assigning 'False' as 'move_id' value when no picking is set), the CacheError is solved.
If a product was already in an RMA in the past, we should be able to
place another RMA in the future.
victoralmau and others added 21 commits February 17, 2025 08:05
For avoiding a big list of IDs being transferred when no sales order
is selected on the RMA, we have changed domains to make use of the
possibility of pyjs expressions allowed in the domains.

No ternary operators nor list sums are allowed in pyjs, but using a
combination of allowed IDs with a controlled length of values + and/or
operators to switch domains is enough for having the right performance
and avoid to depend on other modules like web_domain_field.
Currently translated at 100.0% (79 of 79 strings)

Translation: rma-15.0/rma-15.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale/it/
Currently translated at 100.0% (79 of 79 strings)

Translation: rma-15.0/rma-15.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale/it/
Currently translated at 100.0% (79 of 79 strings)

Translation: rma-15.0/rma-15.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale/de/

[UPD] Update rma_sale.pot
… refunding

Steps to reproduce:

- Create a sales order with an storable product with invoicing policy
  on delivered quantities.
- Confirm it and deliver the product.
- Invoice the order.
- Do an RMA, receive it, and refund it.

Result: the delivered quantity is 1 instead of 0.

This is because the refund generated from the RMA is not linked to
sales order line, nor the RMA reception move. This is done because
other operations are performed:

- Be replaced.
- Be changed by other product.

And we don't also want that meanwhile the RMA is being performed, the
sales order is pending to invoice.

But when the refund has been done, we have it clear, so let's link both
and have sales statistics correct.

FIX: We don't link the refund line with the sales order if the RMA
quantity is not the whole original move quantity. Otherwise, we will
have incoherente delivered/invoiced quantities on the sales order.

TT41645
- Standard procedure.
- Adapt to new `prepare_*_vals` methods.
- Renamed fields adaptation.
- Improved test coverage.

TT44214

s
- Migrate bs4 to bs5
- Fix shipping address choice functionality
- Add tour for the user portal workflow

[UPD] Update rma_sale.pot

[UPD] README.rst

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/
Currently translated at 100.0% (82 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/es/
Currently translated at 96.3% (79 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/it/
Currently translated at 96.3% (79 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/it/

Translated using Weblate (Italian)

Currently translated at 100.0% (82 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/it/

Translated using Weblate (Italian)

Currently translated at 100.0% (82 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/it/
Translated using Weblate (French)

Currently translated at 89.0% (73 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/fr/
[BOT] post-merge updates
Currently translated at 65.8% (54 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/pt_BR/
Extra changes:
- Change reception_move_ids to reception_move_id
- Add test_rma_replace_pick_ship
- Code and method reduction to simplify logic
- Set route_ids (in/out) from procurements

Co-authored-by: Michael Tietz

TT48789

[UPD] Update rma_sale.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/
Currently translated at 100.0% (82 of 82 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/it/
…hange to draft an invoice.

Use case:
- User with permission in sales but not in RMA.
- Cancel sales order or change to draft a linked invoice

TT50260

[BOT] post-merge updates
The rma operation is required in the portal, and it makes sense
for it to be required in the sales wizard as well

[UPD] Update rma_sale.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/
[UPD] Update rma_sale.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/
Currently translated at 100.0% (81 of 81 strings)

Translation: rma-16.0/rma-16.0-rma_sale
Translate-URL: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_sale/it/
@victoralmau
Copy link
Member Author

Could you review it @chienandalu ?

@automatejake
Copy link

Kind of new to this & unfamiliar with the process of contributing to open source projects. However, is there anything I can do to help with migration here?

@pedrobaeza
Copy link
Member

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.