[18.0][MIG] sale_rental: Migration to 18.0#71
Conversation
Replace openerp by odoo in import declarations
Convert readme to new subdir format
the creation of the stock location for rental respects the translations
Currently translated at 85.4% (88 of 103 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_rental/pt_BR/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_rental/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_rental/
Currently translated at 9.7% (10 of 103 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_rental/pt/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_rental/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_rental/
No more need to add users to the packaging group View of rental group is now possible on product.template form view
Standard migration + add some tests
55b725b to
19a48b6
Compare
a68a1c3 to
5c0420c
Compare
|
@chaule97 Could you please do a rebase? |
the PR is waiting for PR OCA/sale-workflow#3505, so the first failing test is expected. It's no merge conflict |
bebf195 to
7f924f8
Compare
There was a problem hiding this comment.
Hi @chaule97 Thank you for migrating this module.
Tested on runboat : rental_qty is not displayed on sale order line and is not set raising a constraint error when checking that product_uom_id = rental_qty * number_of_days
7f924f8 to
9214809
Compare
Can you check again? |
Hi @chaule97 thank you for looking into iti. Leading to Validation Error when trying to create the sale order : |
8d357cf to
a28e7c0
Compare
|
Thanks @chaule97 now that part is not raising errors anymore and you can properly set rental quantity. I spotted another issue with version 18.0 of this module : it does not generate return picking at the end of rental. This is related to how routes/rules are applied in version 18.0, push rules are not automatically triggered anymore. Also, although less important, UI/UX of this module should be reworked to get views coherent with the other modules (for instance product form views have been kept from old version but have not been adapted to newer versions). FYI, I have made a simplified version of this module for version 18.0 for a customer who had simpler requirements than what this module covers (no need for autocompute of duration / quantity, no need for rental prices and periods, etc.) here : https://github.com/lefilament/vertical-rental/tree/18.0-mecaoctet (this branch is in production for that customer) In particular, you may want to have a look here on how to force to apply push rule for generating return picking : https://github.com/lefilament/vertical-rental/blob/ac1537c29cae3cbe0e62af38da1a14a26de3ecf5/sale_rental/models/sale_order_line.py#L183-L184 Also you would need to fix the failing tests |
a28e7c0 to
a7dc95b
Compare
Sorry, I forgot about my fix in version 16.0, can you check again? |
4f60698 to
69acbd8
Compare
69acbd8 to
01b26bd
Compare
There was a problem hiding this comment.
Thank you for this migration.
I do not understand the benefit of adding "rental period" and "product rental pricing" logic. Using pricelists and configuring some units of measure seems to be enough. Maybe I'm missing something... Maybe, if "product rental pricing" and "rental period" have a clear use case, putting them in a separate module since they are not required for this migration.
IMHO, this module is already complex, it would be better to split new features that are not relevant to all projects into separate modules, as I did in v16 here: #36 and #37 (I will migrate them soon).
Also, if we introduce new features, we need tests for them.
| rental_pricing_ids = fields.One2many( | ||
| "product.rental.pricing", "product_id", string="Rental Pricings" | ||
| ) | ||
|
|
There was a problem hiding this comment.
Why introducing a new model "product.rental.pricing" and not using the existing pricelist.item with unit of mesure logic ?
| <menuitem | ||
| id="menu_rental_report_dashboard" | ||
| name="Rental Report" | ||
| parent="sale.sale_order_menu" | ||
| action="action_rental_report_wizard" | ||
| /> |
There was a problem hiding this comment.
It is disturbing to see this menu between quotations and sales. Maybe put it in sale analysis menu or at least add a sequence to put it under locations within the same menu.





[16.0][FIX] sale_rental: fix create a duplicate sale.rental when reconfirming #64
[16.0][IMP] sale_rental: Notification of rental expiration and scheduled return date #65
[16.0][IMP] sale_rental: Price list in different unit of measures #66
[16.0][IMP] sale_rental: Add new calendar view #67
[16.0][IMP] sale_rental: Add new graph view #68
[16.0][IMP] sale_rental: Rental utilization report #69