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

[IMP] event_sale_session: Recovery unconfirmed quantity event #373

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

carolinafernandez-tecnativa
Copy link

@carolinafernandez-tecnativa carolinafernandez-tecnativa commented May 27, 2024

  • Recovery functionality unconfirmed qty on event.session from v14

@Tecnativa
TT49353

@chienandalu @pedrobaeza

@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 16.0-imp-event_sale_session-recovery-button branch 3 times, most recently from 388f675 to b87c212 Compare May 27, 2024 19:30
@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 16.0-imp-event_sale_session-recovery-button branch 2 times, most recently from 4fa81a2 to 39dd7ee Compare May 28, 2024 09:42
@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 16.0-imp-event_sale_session-recovery-button branch from 39dd7ee to 57e3cb6 Compare May 28, 2024 09:58
@carolinafernandez-tecnativa carolinafernandez-tecnativa marked this pull request as ready for review May 28, 2024 10:03
Comment on lines -57 to -72
def test_sale_order_line_session_onchange_autocomplete(self):
"""Test that session is automatically filled and or unset on form"""
form = Form(self.order)
line = form.order_line.new()
line.product_id = self.product
# Case 1: The event is a session event, but has multiple sessions
line.event_id = self.event
self.assertFalse(line.event_session_id)
# Case 2: The event is a session event with only 1 session
(self.event.session_ids - self.session).active = False
line.event_id = self.event
self.assertEqual(line.event_session_id, self.session)
# Case 3: The event is not a session event, session should be unset
line.event_id = self.env.ref("event.event_0")
self.assertFalse(line.event_session_id)

Copy link
Member

Choose a reason for hiding this comment

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

Why removing this whole test?

Choose a reason for hiding this comment

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

Onchange is only applied when you are in form view

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I still don't understand the reason to remove it 😓 are you facing an issue with this test while implementing the new feature?

Copy link
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

This should be in a separate event_sale_session_unconfirmed_qty module IMO

@carolinafernandez-tecnativa
Copy link
Author

@pedrobaeza what do you think to move this functionality to new module?
Also in v14 unconfirmed qty also was added to event.event and there was a button to check all sale orders with state in draft or sent associated to each event.
Maybe the new module should be called event_sale_unconfirmed_qty so we can add both functionalities, what do you think @ivantodorovich ?

@ivantodorovich
Copy link
Contributor

Maybe the new module should be called event_sale_unconfirmed_qty so we can add both functionalities, what do you think @ivantodorovich ?

If it depends on event_session then it should be prefixed with it.

The idea to split them in event_sale_unconfirmed_qty and event_sale_session_unconfirmed_qty is to offer the same feature to people using the event modules but not the event_session module. But if you don't need the feature on the standard events then there's no point in developing it now, still.. it's nice to keep this in mind to structure the modules.

Take for example these two modules:

  • event_registration_multi_qty
  • event_session_registration_multi_qty

@pedrobaeza pedrobaeza added this to the 16.0 milestone May 28, 2024
Copy link

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 Sep 29, 2024
@chienandalu
Copy link
Member

@pedrobaeza please add "no stale" label

@pedrobaeza pedrobaeza removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants