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] fleet vehicle purchase : Migration to 16.0 #155

Open
wants to merge 14 commits into
base: 16.0
Choose a base branch
from

Conversation

lmarion-source
Copy link

No description provided.

@api.depends("fleet_vehicle_from_po")
def _compute_fleet_vehicle_id(self):
for rec in self:
if rec.fleet_vehicle_from_po:

Choose a reason for hiding this comment

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

I don't understand this boolean field. It sets to True when the order is related to a fleet vehicle. So this if section will always be True in this case.
So when the order is not related to a fleet vehicle, it'll fill the fleet_vehicle_id is an empty recordset (and that's also the expected behavior).

Copy link
Author

Choose a reason for hiding this comment

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

This is to cover a practical case where we want to order pieces for several fleet vehicle in one PO:

  • If we put the vehicle on the PO, it will be propagate on all purchase order lines and the vehicle will be readonly in the view. In this case the PO is for one vehicle.
  • If we don't put the vehicle on the PO, we can order pieces for different vehicles in one PO, changing the vehicle on each line. This allows a big customer to order pieces for more than one vehicle in one PO.

@lmarion-source lmarion-source force-pushed the 16.0-mig-fleet_vehicle_purchase branch 3 times, most recently from ed9dae2 to bb02ffd Compare October 16, 2024 06:31
@ivantodorovich
Copy link

/ocabot migration fleet_vehicle_purchase

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Oct 28, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 28, 2024
12 tasks
Copy link

github-actions bot commented Mar 2, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 2, 2025
@marcelsavegnago
Copy link
Member

ping @kaynnan @WesleyOliveira98

@marcelsavegnago
Copy link
Member

@lmarion-source can you rebase please ?

etobella and others added 14 commits March 5, 2025 14:29
Currently translated at 100.0% (9 of 9 strings)

Translation: fleet-14.0/fleet-14.0-fleet_vehicle_purchase
Translate-URL: https://translation.odoo-community.org/projects/fleet-14-0/fleet-14-0-fleet_vehicle_purchase/es/
Currently translated at 100.0% (9 of 9 strings)

Translation: fleet-14.0/fleet-14.0-fleet_vehicle_purchase
Translate-URL: https://translation.odoo-community.org/projects/fleet-14-0/fleet-14-0-fleet_vehicle_purchase/it/
Currently translated at 100.0% (9 of 9 strings)

Translation: fleet-14.0/fleet-14.0-fleet_vehicle_purchase
Translate-URL: https://translation.odoo-community.org/projects/fleet-14-0/fleet-14-0-fleet_vehicle_purchase/pt_BR/
   Initially, there was only one vehicle for one PO.
   Now, if the vehicle is set on the PO, all the PO lines are related to this vehicle
   But if the vehicle is not set on the PO, the user can decide to have different vehicles on every line.
   Use case is a grouped purchase of several items for several vehicles.
@lmarion-source lmarion-source force-pushed the 16.0-mig-fleet_vehicle_purchase branch from bb02ffd to a63f334 Compare March 5, 2025 13:29
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 9, 2025
Copy link
Contributor

@WesleyOliveira98 WesleyOliveira98 left a comment

Choose a reason for hiding this comment

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

LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

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