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][FIX] pos_analytic_by_config: Avoid prefixing #734

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

Conversation

chienandalu
Copy link
Member

Prefixing the distribution shouldn't be necessary. We can hook into the sales move lines prepare method to add or session info that later can be used to figure out the proper distribution.

cc @Tecnativa TT52559

please review @pedrobaeza @victoralmau

Some doubts that come to my mind:

  • The new technique is a little bit hackish...
  • With the former approach, we could match any account from the closing session using the prefixes. Would it make any sense anyway?

Prefixing the distribution shouldn't be necessary. We can hook into the
sales move lines prepare method to add or session info that later can be
used to figure out the proper distribution.

TT52559
@pedrobaeza pedrobaeza changed the title [FIX] pos_analytic_by_config: Avoid prefixing [16.0][FIX] pos_analytic_by_config: Avoid prefixing Jan 16, 2025
@pedrobaeza pedrobaeza added this to the 16.0 milestone Jan 16, 2025

@api.model_create_multi
def create(self, vals_list):
"""We need to receive this key from the vals as the create call is encampsulated
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""We need to receive this key from the vals as the create call is encampsulated
"""We need to receive this key from the vals as the create call is encapsulated

@api.model_create_multi
def create(self, vals_list):
"""We need to receive this key from the vals as the create call is encampsulated
inside the _get_sale_vals method of the pos.session model."""
Copy link
Member

Choose a reason for hiding this comment

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

This is not explaining how and where pos_config_id context is used. docstring also puts the trailing """ in a new line according PEP257.

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.

2 participants