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

[15.0][OU-ADD] pos_order_return: Merged in point_of_sale #4191

Merged
merged 1 commit into from Oct 25, 2023

Conversation

stefan-tecnativa
Copy link
Contributor

@stefan-tecnativa stefan-tecnativa commented Oct 25, 2023

TT45179 @Tecnativa

The OCA module pos_order_return allows the user to partially return a sale_order in the frontend, and also links this refunds with their original orders. From Odoo v15 we can do this in core from the frontend and those links are paired to the ones we were providing. One thing that adds this module that isn't in core is a boolean indicating if you want to allow negative quantities on the POS for products. This feature can be discussed if it is worth it to be conserved in a custom module or not as it was a little out of context anyway.

@chienandalu please review!

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

On the commit message (I paste it here as I can't comment inline of it :))

This module

The OCA module pos_order_return

allows

Write in past tense as we're leaving it behind

the user to return a sale_order fully or partially in the frontend.

This isn't true. What it did was:

  • to link refunds with their original orders
  • to allow partial refunds (Odoo only allowed full ones)

Now this feature is accomplished in core...

From Odoo v16 we can do this in core from the frontend and those links are paired to the ones we were providing.

One think

thing

that adds this module that isn't in core is a boolean indicating if you want to allow negative quantities on the POS for products. This feature can be discussed if it is worth it to be conserved in a custom module or not.

Talk about the logic:

This module also added the restriction for negative quantities in the point of sale. It can be considered for an extra module as it was a little bit out of context anyway.

openupgrade_scripts/scripts/base/15.0.1.3/pre-migration.py Outdated Show resolved Hide resolved
cr,
"""
ALTER TABLE pos_order_line
ADD COLUMN IF NOT EXISTS refunded_orderline_id INTEGER
Copy link
Member

Choose a reason for hiding this comment

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

I'd say it would be enough renaming the fields: returned_line_id and refund_line_ids to their new pairs in point_of_sale

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood

openupgrade_scripts/scripts/base/15.0.1.3/pre-migration.py Outdated Show resolved Hide resolved
@stefan-tecnativa stefan-tecnativa force-pushed the 15.0-mig-pos_order_return branch 2 times, most recently from ff41db8 to 45ecf5e Compare October 25, 2023 09:00
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Why two commits?

Also, fit the commit message in 80 column width lines

@stefan-tecnativa
Copy link
Contributor Author

Why two commits?

Also, fit the commit message in 80 column width lines

Changed!

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

ping @legalsylvain if you want to take a look

Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

Thanks !

@pedrobaeza pedrobaeza added this to the 15.0 milestone Oct 25, 2023
TT45179

The OCA module pos_order_return allows the user to partially return a
sale_order in the frontend, and also links this refunds with their
original orders. From Odoo v15 we can do this in core from the frontend
and those links are paired to the ones we were providing.
One thing that adds this module that isn't in core is a boolean indicating
if you want to allow negative quantities on the POS for products.
This feature can be discussed if it is worth it to be conserved
in a custom module or not as it was a little out of context anyway.
@stefan-tecnativa
Copy link
Contributor Author

@pedrobaeza can you take a look again please?

@pedrobaeza pedrobaeza merged commit 27c8eeb into OCA:15.0 Oct 25, 2023
2 checks passed
@pedrobaeza pedrobaeza deleted the 15.0-mig-pos_order_return branch October 25, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants