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

[ADD][14.0] Add vehicle ownership, linking partners to vehicles #127 #130

Merged
merged 1 commit into from
Nov 26, 2023

Conversation

rpsjr
Copy link

@rpsjr rpsjr commented Nov 23, 2023

#127
#126

This PR Add vehicle ownership, linking partners to vehicles.

cc @ivantodorovich @mamcode @sbidoul @mymage @brian10048 @marcelsavegnago @pedrobaeza

@etobella
Copy link
Member

Can you squaah your commits in a single one? You can use git rebate in order to do that. Also fix the commit name to [ADD] ...

Last, but not least, you don't need to close and open a new issue. If you use git rebase, you can do it all at once 😉

Copy link
Member

@mymage mymage left a comment

Choose a reason for hiding this comment

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

LGTM for models and views. I don't know if all the file in the root (as .gitignore) are right bat this is a my limit :-(.

@rpsjr rpsjr force-pushed the 14.0-fleet_vehicle_ownership branch from 94e3930 to ceedfa5 Compare November 24, 2023 11:15
@rpsjr rpsjr changed the title [NEW][14.0] Add vehicle ownership, linking partners to vehicles #127 [ADD][14.0] Add vehicle ownership, linking partners to vehicles #127 Nov 24, 2023
@rpsjr
Copy link
Author

rpsjr commented Nov 24, 2023

Can you squaah your commits in a single one? You can use git rebate in order to do that. Also fix the commit name to [ADD] ...

Last, but not least, you don't need to close and open a new issue. If you use git rebase, you can do it all at once 😉

done

@etobella
Copy link
Member

Commit message should be [ADD] fleet_vehicle_ownership

Add some tests please

@rpsjr rpsjr marked this pull request as draft November 24, 2023 12:36
@rpsjr rpsjr force-pushed the 14.0-fleet_vehicle_ownership branch from 0f07089 to 3050230 Compare November 24, 2023 12:43
@rpsjr rpsjr marked this pull request as ready for review November 24, 2023 12:45
@rpsjr rpsjr marked this pull request as draft November 24, 2023 12:46
@rpsjr rpsjr force-pushed the 14.0-fleet_vehicle_ownership branch from e3fa333 to 32de3e1 Compare November 24, 2023 13:12
@rpsjr rpsjr marked this pull request as ready for review November 24, 2023 13:12
@rpsjr rpsjr force-pushed the 14.0-fleet_vehicle_ownership branch from 8127d96 to 239c4f8 Compare November 24, 2023 13:21
@rpsjr
Copy link
Author

rpsjr commented Nov 24, 2023

Commit message should be [ADD] fleet_vehicle_ownership

Add some tests please

done!

@rpsjr rpsjr force-pushed the 14.0-fleet_vehicle_ownership branch 3 times, most recently from f11c934 to 56be8d2 Compare November 24, 2023 14:24
Copy link
Sponsor Member

@marcelsavegnago marcelsavegnago left a comment

Choose a reason for hiding this comment

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

@rpsjr Congratulations on the work and thank you very much for your contribution.

)

def action_view_vehicles(self):
xmlid = "fleet.fleet_vehicle_action"
Copy link
Member

Choose a reason for hiding this comment

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

You should add self.ensure_one()

Copy link
Author

Choose a reason for hiding this comment

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

done

def action_view_vehicles(self):
xmlid = "fleet.fleet_vehicle_action"
action = self.env["ir.actions.act_window"]._for_xml_id(xmlid)
if self.vehicle_count > 1:
Copy link
Member

Choose a reason for hiding this comment

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

I would recomend to add a default_owner_id = self.id on context

Copy link
Author

Choose a reason for hiding this comment

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

done

@etobella
Copy link
Member

Once the changes are applied, we can merge. Thanks for the great job 😄

@rpsjr
Copy link
Author

rpsjr commented Nov 24, 2023 via email

Copy link

@kaynnan kaynnan left a comment

Choose a reason for hiding this comment

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

[ONLY FUNCTIONAL REVIEW] APPROVED

Vehicle Associate Owner:

image

Partner (Form Associate a vehicle):

image

Partner Multiple Vehicles:

image
image

@etobella
Copy link
Member

What about default owner beeing the company (res.partner) as this is implicit when fleet app is used to HR purooses?

Well, what I am saying is that you are on a partner and clicking the vehicles. From there you can add a new one. Odoo logic says that you are adding a vehicle to the original partner. So it makes sense to do as I say

@rpsjr
Copy link
Author

rpsjr commented Nov 24, 2023 via email

@rpsjr rpsjr force-pushed the 14.0-fleet_vehicle_ownership branch 2 times, most recently from 3a5752f to cc7a598 Compare November 24, 2023 19:53
@rpsjr rpsjr requested a review from etobella November 24, 2023 19:56
rfc

rfc clean up

[RFC] cleanup redundant files

pre-commit

[RFC] improve res_partner

pre-commit

typo

typo

typo

[RFC] default_owner_id

[RFC] tests
@rpsjr rpsjr force-pushed the 14.0-fleet_vehicle_ownership branch from e449aa4 to 72590be Compare November 24, 2023 21:28
@rpsjr rpsjr requested a review from etobella November 24, 2023 21:31
@etobella
Copy link
Member

So, we can proceed for merge.

Thanks for doing the all the changes 😉

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-130-by-etobella-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 30005c2 into OCA:14.0 Nov 26, 2023
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9294ddc. Thanks a lot for contributing to OCA. ❤️

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.

None yet

6 participants