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

[16.0][MIG] sale_rental #2325

Closed
wants to merge 61 commits into from
Closed

Conversation

Murtaza-OSI
Copy link
Contributor

No description provided.

Alexis de Lattre and others added 30 commits January 3, 2023 18:38
…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".
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
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
@chandni299
Copy link

Hello @Murtaza-OSI , If I am not wrong then we need to migrate the first module sale_start_end_dates to 16.0 as it is part of __manifest__.py file of module sale_rental here

@rousseldenis
Copy link
Contributor

/ocabot migration sale_rental

@pedrobaeza
Copy link
Member

This one should be definitively be moved to OCA/vertical-rental on this version.

Copy link
Contributor

@Kev-Roche Kev-Roche left a 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.

Comment on lines +19 to +33
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
Copy link
Contributor

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

Suggested change
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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.assertEqual(sol.price_subtotal, 60)
self.assertEqual(sol.price_subtotal, 600)

Comment on lines +58 to +66
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)]})
Copy link
Contributor

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.

Suggested change
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)]})

@coffeinisfun
Copy link

I have made a PR to move this module to OCA/vertical-rental like suggested by @pedrobaeza: OCA/vertical-rental#45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.