Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ivantodorovich
Copy link

@ivantodorovich ivantodorovich commented Jul 1, 2022

Glue module between pos_event_sale and pos_sale, to handle events when importing Sales Orders from the Point of Sale.

@ivantodorovich ivantodorovich added this to the 15.0 milestone Jul 1, 2022
@legalsylvain
Copy link

legalsylvain commented Jul 1, 2022

  • pos_event_sale depends on event_sale and point_of_sale
  • event_sale depends on event and sale_management (auto_installable)
  • pos_sale depends on point_of_sale and sale_management (auto_installable)

So if pos_event_sale is installed : event, sale_management, point_of_sale are installed.
So pos_sale is installed for sure.

That way no need to create an extra glue module between both module. You should move the code of the current glue module into pos_event_sale directly.

Or did I missed something ?

Kind regards.

That way, no need to overload _create_event_registrations function and it will reduce the code you propose.

@ivantodorovich
Copy link
Author

I thought about this myself, but glue modules can still be manually uninstalled. So I rather keep the dependency chain, no?

@legalsylvain
Copy link

glue modules can still be manually uninstalled

Well auto_installable module can be uninstalled, yes. or with some funny module switched to not_auto_installable. ;-)

in fact there are two kind of auto_installable modules :
A) glue module that make working two modules together. If the glue module is not installed, some feature will not work properly. (for example I think that uninstalling sale_stock is risky!)
B) promotional module that Odoo SA set to auto_install to make sure the wow effect is present for each customer. (like partner_autocomplete, mail_bot...)

-> pos_sale is a glue module. (A)

Two possibilities :

  1. keep the PR as it.
  2. add an extra explicit dependency to pos_sale in the pos_event_sale manifest. That will reduce the complexity of the code, and you are not forcing people to use extra module. (because pos_sale should be installed by design).

As I just don't see a reason to not want to have pos_sale installed if pos_event_sale is installed, I'm in favor of the second option. (not a blocking point though.)

kind regards.

@ivantodorovich
Copy link
Author

Thanks! I rather keep it like this though.

  • pos_event_sale is already too big, no need to add more complexity into it
  • IMO the separation is clear. There's no real sale.order flow or model dependency in pos_event_sale, we just use the hability to set products and ticket prices on events from event_sale, but that's it.
  • Odoo is already moving parts of event_sale to event (it moved event.tickets, partially, recently).. so I even see a future where event_sale dependency is dropped
  • This new module on the other hand is meant to hold real sale.order <--> pos.order features, same as the core one

@ivantodorovich ivantodorovich force-pushed the 15.0-add-pos-sale-pos-event-sale branch from 30a2b30 to 9934df9 Compare July 5, 2022 11:54
@ivantodorovich
Copy link
Author

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-805-by-ivantodorovich-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 3f0ac21 into OCA:15.0 Jul 25, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 237f208. 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.

4 participants