-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[16.0][MIG] sale_rental #2325
[16.0][MIG] sale_rental #2325
Conversation
…the same SO as the rentals = the start date of the rentals, because we suppose that these products are "accessories" of the rental. Re-organise the order of some lines of code to make it more "logic".
…he module description.
Add POT file Add full FR translation for sale_start_end_dates Add partial FR translation for sale_rental Add pt_BR translation, contributed by Caio Barros.
…g because it means that, if you had sale_rental installed, you are missing the link betweek purchase order lines and invoice lines (for purchase orders created from pickings)
…ew of sale order line, and instructions on how to do it Add demo data to automatically add admin and demo to group sale.group_mrp_properties, to have access to form view of sale order lines.
…a link to the screencast in the module description
…y of the rental features
Update POT file and FR translation Fix translated string in code Slovene translations added OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex remove obsolete .pot files [ci skip] fix invalid pt_BR.po Update sale_rental.pot Translated using Weblate (Nederlands (nl_NL)) Currently translated at 100,0% (99 of 99 strings) Translation: sale-workflow-10.0/sale-workflow-10.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_rental/nl_NL/ Update sale_rental.pot Update translation files Updated by Actualizar ficheiros PO com o novo POT (msgmerge) hook in Weblate. Translated using Weblate (German) Currently translated at 28.3% (28 of 99 strings) Translation: sale-workflow-10.0/sale-workflow-10.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_rental/de/ [REM] Translation file for error
Add option to copy image from product to rental service default_code should not be a required field in rental service wizard Add help message on rental_qty field
Replace openerp by odoo in import declarations
Convert readme to new subdir format
Standard migration + add some tests
Currently translated at 40.7% (42 of 103 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_rental/fr_FR/
Currently translated at 63.1% (65 of 103 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_rental/fr_FR/
Currently translated at 49.5% (51 of 103 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_rental Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_rental/fr/
Hello @Murtaza-OSI , If I am not wrong then we need to migrate the first module |
/ocabot migration sale_rental |
This one should be definitively be moved to OCA/vertical-rental on this version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Murtaza-OSI do you plan to fix this PR and move it top OCA/vertical-rental like suggested by @pedrobaeza ?
If no, I can do it.
line_vals = { | ||
"product_id": self.test_rental_prod.id, | ||
"start_date": "2022-01-01", | ||
"end_date": "2022-01-10", | ||
"rental_qty": 1, | ||
} | ||
|
||
# with so_form.order_line.new() as line: | ||
# line.product_id = self.test_rental_prod | ||
# line.start_date = "2022-01-01" | ||
# line.end_date = "2022-01-10" | ||
# line.rental_qty = 1 | ||
so = so_form.save() | ||
so.write({"order_line": [(0, 0, line_vals)]}) | ||
sol = so.order_line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to play the onchange
line_vals = { | |
"product_id": self.test_rental_prod.id, | |
"start_date": "2022-01-01", | |
"end_date": "2022-01-10", | |
"rental_qty": 1, | |
} | |
# with so_form.order_line.new() as line: | |
# line.product_id = self.test_rental_prod | |
# line.start_date = "2022-01-01" | |
# line.end_date = "2022-01-10" | |
# line.rental_qty = 1 | |
so = so_form.save() | |
so.write({"order_line": [(0, 0, line_vals)]}) | |
sol = so.order_line | |
with so_form.order_line.new() as line: | |
line.product_id = self.test_rental_prod | |
line.start_date = "2022-01-01" | |
line.end_date = "2022-01-10" | |
line.rental_qty = 1 | |
line.product_uom_qty = 10 | |
so = so_form.save() | |
sol = so.order_line |
so = so_form.save() | ||
so.write({"order_line": [(0, 0, line_vals)]}) | ||
sol = so.order_line | ||
self.assertEqual(sol.price_subtotal, 60) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertEqual(sol.price_subtotal, 60) | |
self.assertEqual(sol.price_subtotal, 600) |
line_vals = { | ||
"product_id": self.test_rental_prod.rented_product_id.id, | ||
"name": "Test", | ||
"display_type": False, | ||
"product_uom": self.env.ref("uom.product_uom_day").id, | ||
"product_uom_qty": 1, | ||
"sell_rental_id": rental, | ||
} | ||
so.write({"order_line": [(0, 0, line_vals)]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line values are already defined in the upper lines.
line_vals = { | |
"product_id": self.test_rental_prod.rented_product_id.id, | |
"name": "Test", | |
"display_type": False, | |
"product_uom": self.env.ref("uom.product_uom_day").id, | |
"product_uom_qty": 1, | |
"sell_rental_id": rental, | |
} | |
so.write({"order_line": [(0, 0, line_vals)]}) |
I have made a PR to move this module to OCA/vertical-rental like suggested by @pedrobaeza: OCA/vertical-rental#45 |
No description provided.