Skip to content

[13.0][MIG] pos_order_mgmt #584

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

Merged
merged 62 commits into from
Feb 4, 2021
Merged

Conversation

dalonsod
Copy link

@dalonsod dalonsod commented Jan 8, 2021

Supersedes #487 due to inactivity

David Vidal and others added 30 commits January 8, 2021 10:05
When the PoS is using fiscal positions it can lead to errors when
computing the reprinted ticket value because the tax mapping function
computes them from the current order instead of from the one belonging
to the line. So we set our loaded order temporarily as the selected one
just to bring it back to the current one after it's printed.
Currently translated at 100.0% (20 of 20 strings)

Translation: pos-11.0/pos-11.0-pos_order_mgmt
Translate-URL: https://translation.odoo-community.org/projects/pos-11-0/pos-11-0-pos_order_mgmt/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-11.0/pos-11.0-pos_order_mgmt
Translate-URL: https://translation.odoo-community.org/projects/pos-11-0/pos-11-0-pos_order_mgmt/
- Fix search clear button

- Refactor load_order and actions

This refactors load_data into two functions: load_order_data and load_order_from_data.
Also, when executing actions, instead of sending the order as an argument, only the order_data will be sent.
The action method is responsible for generating the order data (if that's what it needs)

All the refund logic has been extracted from the various methods, and it's now in action_return.

Now, returns have a specific 'Refund XXXX' name.

- IMP Allow to duplicate done orders from the POS

- IMP filter by customer name, too, when searching
[FIX] compatibility with pos_restaurant OCA#339 cortesy @carlosDomatix
[FIX] add _compute_refund_order_qty
[ADD] pos order view form. Add links to original returned order and refund orders.
[IMP] when refunding an order via the 'Refund' button in back office, set the correct returned_order_id.
[IMP] Add helper on each button
[ADD] python test
[REF] JS remove useless code
[REF] Python remove useless code
[FIX] remove bad oldname
[FIX] remove gap in bill display, when it is a refund
[FIX] when reprinting a bill, the returned order name is displayed, if any
[FIX] JS lint, with OCA eslint file
[ADD] french translation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-12.0/pos-12.0-pos_order_mgmt
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_mgmt/
…n order, if the user refreshes the browser the order will load again. And this will happen for every previously printed order in the session.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-12.0/pos-12.0-pos_order_mgmt
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_mgmt/
…right the amount and make it's header take less space
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-12.0/pos-12.0-pos_order_mgmt
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_mgmt/
@dalonsod
Copy link
Author

@legalsylvain @chienandalu could you review? Thanks!

@trinanda I've reused some of the changes of your PR, I should incluye you in the CONTRIBUTORS file. If you agree, please tell me your full name and email

@chienandalu
Copy link
Member

@dalonsod Yes, although I'll have to test it in my local as runbot isn't working currently

@dalonsod
Copy link
Author

hello @chienandalu have you tested it locally? Unfortunately runbot is still unavailable. Thanks!

@chienandalu
Copy link
Member

chienandalu commented Jan 26, 2021

I'm so sorry. I didn't have the time yet :/ I'll try to rebuild the runbot though

@cubells
Copy link
Member

cubells commented Feb 2, 2021

When I try to merge this pr with current version with

gitaggregate -c repos.yaml

I've got an error:

fatal: refusing to merge unrelated stories

So I think there is something wrong with your history.

@cubells
Copy link
Member

cubells commented Feb 2, 2021

Can you do a rebase?

@dalonsod
Copy link
Author

dalonsod commented Feb 2, 2021

@cubells maybe I'm doing something wrong, but I've made git rebase 13.0 and git tells me that branch is up to date. When PR was made no merge conflicts were detected

@cubells
Copy link
Member

cubells commented Feb 2, 2021

Have you run git push -f to your repo in order to sync with oca pos repo?

@dalonsod
Copy link
Author

dalonsod commented Feb 2, 2021

Have you run git push -f to your repo in order to sync with oca pos repo?

Ok, did it and git told me that everything up-to-date

@dalonsod
Copy link
Author

dalonsod commented Feb 4, 2021

@legalsylvain @chienandalu since PR creation it's been impossible to test it on runbot, at least for me. I don't think if it's a problem of this PR, or a general issue of this repo (runbot too busy). Is this a normal situation, or could it be solved? Thanks!

@dalonsod
Copy link
Author

dalonsod commented Feb 4, 2021

Now it's working, thanks!
@cubells you can test it on runbot

Copy link
Member

@cubells cubells left a comment

Choose a reason for hiding this comment

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

👍

LGTM

Code review and test

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 to have ported this must have module.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

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.

Tested at last 😄 Thanks!

@chienandalu
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 97896d9 into OCA:13.0 Feb 4, 2021
@OCA-git-bot
Copy link
Contributor

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