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] stock_picking_report_undelivered_product: Migration to 18.0 #367

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

Conversation

juancarlosonate-tecnativa
Copy link

@juancarlosonate-tecnativa juancarlosonate-tecnativa commented Feb 3, 2025

Since odoo base in the delivery slip report already generates a table for undelivered products, i try to reuse as much as possible to avoid code duplication. Retrieve all the stock moves based on the applied filter and set them accordingly. Then, perform a small operation to calculate the actual undelivered quantities: bo_line.product_uom_qty - bo_line.quantity

@Tecnativa TT54343

@CarlosRoca13 @sergio-teruel can you check? thanks!

sergio-teruel and others added 12 commits January 30, 2025 10:28
… undelivered products in delivery slip report
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-reporting-15.0/stock-logistics-reporting-15.0-stock_picking_report_undelivered_product
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-reporting-15-0/stock-logistics-reporting-15-0-stock_picking_report_undelivered_product/
Currently translated at 100.0% (19 of 19 strings)

Translation: stock-logistics-reporting-15.0/stock-logistics-reporting-15.0-stock_picking_report_undelivered_product
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-reporting-15-0/stock-logistics-reporting-15-0-stock_picking_report_undelivered_product/es/
Copy link
Contributor

@sergio-teruel sergio-teruel left a comment

Choose a reason for hiding this comment

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

Great @juancarlosonate-tecnativa !!!

Minor fix!!

@sergio-teruel
Copy link
Contributor

Review tests!!

@rousseldenis
Copy link
Contributor

/ocabot migration stock_picking_report_undelivered_product

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Agree with @sergio-teruel. Don't replace views

@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 18.0-mig-stock_picking_report_undelivered_product branch from 20cdb90 to 7975c6f Compare February 3, 2025 11:02
Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

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

Thanks!

@pedrobaeza
Copy link
Member

@rousseldenis

@juancarlosonate-tecnativa
Copy link
Author

@rousseldenis @sergio-teruel check again please!


<xpath expr="//span[@t-field='bo_line.product_uom_qty']/.." position="after">
<td class="text-center w-auto">
<span t-esc="bo_line.product_uom_qty - bo_line.quantity">3.00</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 3.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

Upsss I see... it's in original view...
Do you know that you can user attribute 'move' to move xml elements??

Copy link
Contributor

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

i know it exists, @CarlosRoca13 mentioned it to me, but i don't know how to use it. Can you give me some more details?

Choose a reason for hiding this comment

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

please check again

@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 18.0-mig-stock_picking_report_undelivered_product branch from 7975c6f to a9c6a97 Compare February 4, 2025 09:47
class StockMove(models.Model):
_inherit = "stock.move"

splitted_stock_move_orig_id = fields.Many2one(
Copy link
Contributor

Choose a reason for hiding this comment

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

@juancarlosonate-tecnativa Do we lose the information on existing databases ?

Choose a reason for hiding this comment

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

this information is no longer useful and will never be used

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this change needs to be analysed in more depth.

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.

9 participants