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][MIG] pos_session_pay_invoice: Migration to version 16.0 #1226

Open
wants to merge 22 commits into
base: 16.0
Choose a base branch
from

Conversation

carlos-lopez-tecnativa
Copy link
Contributor

@Tecnativa TT49807

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.

Hi @carlos-lopez-tecnativa.

Thanks for porting this module tecnically, I don't understand why

  • some button open a wizard that inherit from cash.pay.invoice,
  • and in other button, it open a new model pos.box.cash.invoice.in / pos.box.cash.invoice.out.

could you elaborate ?

pos_session_pay_invoice/readme/ROADMAP.rst Outdated Show resolved Hide resolved
@carlos-lopez-tecnativa
Copy link
Contributor Author

Hi @carlos-lopez-tecnativa.

Thanks for porting this module tecnically, I don't understand why

  • some button open a wizard that inherit from cash.pay.invoice,
  • and in other button, it open a new model pos.box.cash.invoice.in / pos.box.cash.invoice.out.

could you elaborate ?

Hi @legalsylvain,

In this module, I have only migrated and made minimal changes for now. However, if you consider it necessary, I can refactor it similarly to this PR to inherit from the new wizard cash.pay.invoice for customer/vendor invoices instead of using two separate wizards.

Before the referenced PR, these wizards (cash.invoice.in, cash.invoice.out) inherited from cash.box.out, but as it no longer exists, I created a single, more generic wizard called cash.pay.invoice. In this module, the wizard that depends on cash.invoice.in is updated to inherit from cash.pay.invoice. However, the wizards pos.box.cash.invoice.out and pos.box.cash.invoice.in do not inherit from any, so I didn't touch them.

Let me know if the refactor is welcome.

@legalsylvain
Copy link
Contributor

Hi @carlos-lopez-tecnativa.
Sorry. I didn't understood. I tested a little locally.
Functionaly, why there are two different ways to do the same thing ?

@carlos-lopez-tecnativa
Copy link
Contributor Author

Hi @carlos-lopez-tecnativa. Sorry. I didn't understood. I tested a little locally. Functionaly, why there are two different ways to do the same thing ?

@legalsylvain That was the behavior in the previous version; there were several wizards to do each thing. Now, based on my previous comment and the referenced PR(OCA/account-payment#743), we could simplify this. Let me know if that works for you. @pedrobaeza what do you think?

@pedrobaeza
Copy link
Member

Yes, please simplify it.

@legalsylvain
Copy link
Contributor

Agree with Pedro. Let me know when you want review.
Thanks for the work !

@carlos-lopez-tecnativa
Copy link
Contributor Author

carlos-lopez-tecnativa commented Aug 13, 2024

@pedrobaeza @legalsylvain I have updated the code to inherit functionality from the cash.pay.invoice wizard and removed the older wizards. Please review the changes and let me know if they work fine for you.

@pedrobaeza
Copy link
Member

/ocabot migration pos_session_pay_invoice

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Aug 14, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Aug 14, 2024
37 tasks
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

I can't find the buttons specified in the README in the POS session.

pos_session_pay_invoice/README.rst Outdated Show resolved Hide resolved
@pedrobaeza
Copy link
Member

I don't understand why limiting the invoice payment to cash methods. Someone can come to your physical store to pay an invoice, and choose to pay with credit card. I think that limitation should be gone.

@pedrobaeza
Copy link
Member

And anyway, even adding a cash payment method, I don't find the buttons referred in the README

@carlos-lopez-tecnativa
Copy link
Contributor Author

And anyway, even adding a cash payment method, I don't find the buttons referred in the README

@pedrobaeza the buttons are here. Could you attach an image, please?
image

image

@pedrobaeza
Copy link
Member

I was looking in the PoS session "frontend". In any moment the README mentions that you should go to the session backend form.

@carlos-lopez-tecnativa
Copy link
Contributor Author

I don't understand why limiting the invoice payment to cash methods. Someone can come to your physical store to pay an invoice, and choose to pay with credit card. I think that limitation should be gone.

This behavior is from the previous version. Do you want us to change it to allow the user to select any payment method available on POS? (But only if the payment method has a journal set.) Please confirm so I can adapt the code.

@pedrobaeza
Copy link
Member

OK, I see the functionality very limited having to go to backend, so let's not invest more time in this. Please clarify the usage README though.

@carlos-lopez-tecnativa
Copy link
Contributor Author

OK, I see the functionality very limited having to go to backend, so let's not invest more time in this. Please clarify the usage README though.

Odoo, in the new version, has moved most functionalities to the frontend. This implies more effort to change it to the frontend. The task for now is to migrate the current module.
I have updated the readme. Please let me know if it is clearer now. Thanks.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Code and functional review

@carlos-lopez-tecnativa
Copy link
Contributor Author

@legalsylvain, could you please review again?

@legalsylvain
Copy link
Contributor

Hi @carlos-lopez-tecnativa. Thanks for the ping ! I just come back from hollidays today. I take a look this week.

thanks !

@carlos-lopez-tecnativa
Copy link
Contributor Author

Hi @carlos-lopez-tecnativa. Thanks for the ping ! I just come back from hollidays today. I take a look this week.

thanks !

@legalsylvain I hope you had a great holiday! Would you kindly take another look when you have a chance? I'd appreciate any updates or feedback you may have.

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.

code review LG

Jaime Arroyo and others added 19 commits September 19, 2024 07:47
Currently translated at 86.6% (26 of 30 strings)

Translation: pos-14.0/pos-14.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice/es/
Currently translated at 100.0% (30 of 30 strings)

Translation: pos-14.0/pos-14.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice/es/
Currently translated at 100.0% (30 of 30 strings)

Translation: pos-14.0/pos-14.0-pos_session_pay_invoice
Translate-URL: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_session_pay_invoice/it/
@legalsylvain
Copy link
Contributor

Thanks !

@legalsylvain
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-1226-by-legalsylvain-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 19, 2024
Signed-off-by legalsylvain
@carlos-lopez-tecnativa
Copy link
Contributor Author

I have no idea why the test failed. It works fine on my local environment. Does anyone have any ideas? The test that failed is in other modules.

image

image

@OCA-git-bot
Copy link
Contributor

@legalsylvain your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-1226-by-legalsylvain-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

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.