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

[FIX] point_of_sale,l10n_be_pos_sale: invoice settled order #139467

Conversation

robinengels
Copy link
Contributor

@robinengels robinengels commented Oct 23, 2023

Current behavior:
In Belgium when using a EU intracom tax, as we need to report those special sales to the government we need to create an invoice as we need to report the customer name, VAT number and the country where the goods are going to end up

Steps to reproduce:

  • Create an order with a product and a tax (0% EU M)
  • Settle the order in the PoS and pay it (no invoice)
  • Go to the accounting and check the EC Sales List report
  • There is an error shown in the report

opw-3514737

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Oct 23, 2023

Pull request status dashboard

@robinengels robinengels force-pushed the 16.0-opw-3514737-be_pos_sale_invoice-roen branch from 5773f0f to 655d674 Compare October 23, 2023 12:10
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Oct 23, 2023
@robinengels robinengels force-pushed the 16.0-opw-3514737-be_pos_sale_invoice-roen branch from 655d674 to fd39961 Compare October 24, 2023 09:36
@robinengels robinengels marked this pull request as ready for review October 24, 2023 09:36
@robinengels robinengels force-pushed the 16.0-opw-3514737-be_pos_sale_invoice-roen branch from fd39961 to 472ca57 Compare October 24, 2023 09:37
@C3POdoo C3POdoo requested review from a team, JulienAlardot and caburj and removed request for a team October 24, 2023 09:37
@robinengels robinengels force-pushed the 16.0-opw-3514737-be_pos_sale_invoice-roen branch 3 times, most recently from f1c8693 to 9a97597 Compare October 25, 2023 10:07
Copy link
Contributor

@JulienAlardot JulienAlardot left a comment

Choose a reason for hiding this comment

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

IMO we should force the creation of the invoice, else it would still break everything I will ask the POs for specifications

Please update the commit message to reflect the real issue

  • ?In Belgium? when using a EU intracom tax, as we need to report those special sales to the government we need to create an invoice as we need to report the customer name, VAT number and the country where the goods are going to end up
  • Side-note: Another Belgian requirement in most cases is a document proving the goods will cross borders (if the goods aren't delivered but pick up directly)

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
Copy link
Contributor

Choose a reason for hiding this comment

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

Will only report it on this file but never adds new coding UTF-8, it's deprecated since python3.0 and Odoo stopped using python 2 for a while

Comment on lines 28 to 30
'partner_id': self.partner_a.id,
'order_line': [(0, 0, {
'product_id': self.product_a.id,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'partner_id': self.partner_a.id,
'order_line': [(0, 0, {
'product_id': self.product_a.id,
'partner_id': self.partner_a.id,
'order_line': [Command.create({
'product_id': self.product_a.id,

@tsb-odoo
Copy link
Contributor

To me, this PR is reacting to a symptom (namely highlighting problems with the EC Sales List because contextually, it was the concern that triggered this PR) but there are other aspects to reconsider in depth.

Wouldn't it be wiser to consider downpayments as invoices in any case ?
There is an open conversation about this (namely task 2786723) but also legal evolutions one should know. Does it really concern Belgium only ?
https://entreprendre.service-public.fr/vosdroits/F31412#:~:text=Depuis%20le%201er%20janvier,r%C3%A9ception%20de%20la%20facture%20finale.

@robinengels robinengels force-pushed the 16.0-opw-3514737-be_pos_sale_invoice-roen branch 4 times, most recently from 84455d4 to e0895dc Compare October 30, 2023 09:23
@JulienAlardot
Copy link
Contributor

@tsb-odoo So? We want this fix and rework that case on the side or we don't want this fix and rework that case on the side?
@robinengels @caburj Do you know anything about that case that could answer tsb questions?

@robinengels
Copy link
Contributor Author

@tsb-odoo ping

@robinengels
Copy link
Contributor Author

@tsb-odoo @JulienAlardot ping

@robinengels
Copy link
Contributor Author

@tsb-odoo @JulienAlardot @caburj ping

@robinengels
Copy link
Contributor Author

@tsb-odoo @JulienAlardot @caburj ping

Copy link
Contributor

@caburj caburj left a comment

Choose a reason for hiding this comment

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

I'm okay with this patch unless @tsb-odoo really thinks this is a mistake.


export const PoSSaleBePaymentScreen = (PaymentScreen) =>
class extends PaymentScreen {
async toggleIsToInvoice() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
async toggleIsToInvoice() {
toggleIsToInvoice() {

Don't change the "color" of the function, we should keep it synchronous.

async toggleIsToInvoice() {
const has_origin_order = this.currentOrder.get_orderlines().some(line => line.sale_order_origin_id);
if(this.currentOrder.is_to_invoice() && this.env.pos.company.country.code === "BE" && has_origin_order){
await this.showPopup('ErrorPopup', {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
await this.showPopup('ErrorPopup', {
this.showPopup('ErrorPopup', {

Comment on lines 8 to 10
setup() {
super.setup();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove this since you're not adding anything in the setup logic.

@robinengels robinengels force-pushed the 16.0-opw-3514737-be_pos_sale_invoice-roen branch 2 times, most recently from 5cd54f7 to 8a96f6f Compare December 4, 2023 08:57
@robinengels
Copy link
Contributor Author

@caburj You might need to R+ this one again

@caburj
Copy link
Contributor

caburj commented Dec 15, 2023

robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Dec 15, 2023

@robinengels @caburj staging failed: ci/runbot on 5699906808539f79c7c9d670b39ab68c63d1dca9 (view more at https://runbot.odoo.com/runbot/build/55176288)

Current behavior:
?In Belgium? when using a EU intracom tax, as we need to report those
special sales to the government we need to create an invoice as we need
to report the customer name, VAT number and the country where the goods
are going to end up

Steps to reproduce:
- Create an order with a product and a tax (0% EU M)
- Settle the order in the PoS and pay it (no invoice)
- Go to the accounting and check the EC Sales List report
- There is an error shown in the report

opw-3514737
@robinengels robinengels force-pushed the 16.0-opw-3514737-be_pos_sale_invoice-roen branch from c2fd189 to d31d8c0 Compare December 15, 2023 15:52
@caburj
Copy link
Contributor

caburj commented Dec 20, 2023

robodoo r+

robodoo pushed a commit that referenced this pull request Dec 20, 2023
Current behavior:
?In Belgium? when using a EU intracom tax, as we need to report those
special sales to the government we need to create an invoice as we need
to report the customer name, VAT number and the country where the goods
are going to end up

Steps to reproduce:
- Create an order with a product and a tax (0% EU M)
- Settle the order in the PoS and pay it (no invoice)
- Go to the accounting and check the EC Sales List report
- There is an error shown in the report

opw-3514737

closes #139467

Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
@robodoo robodoo closed this Dec 20, 2023
@fw-bot
Copy link
Contributor

fw-bot commented Dec 24, 2023

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

3 similar comments
@fw-bot
Copy link
Contributor

fw-bot commented Dec 25, 2023

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot
Copy link
Contributor

fw-bot commented Dec 26, 2023

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot
Copy link
Contributor

fw-bot commented Dec 27, 2023

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot
Copy link
Contributor

fw-bot commented Dec 28, 2023

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

3 similar comments
@fw-bot
Copy link
Contributor

fw-bot commented Dec 29, 2023

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot
Copy link
Contributor

fw-bot commented Dec 30, 2023

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot
Copy link
Contributor

fw-bot commented Jan 1, 2024

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

@fw-bot fw-bot deleted the 16.0-opw-3514737-be_pos_sale_invoice-roen branch January 3, 2024 17:46
@fw-bot
Copy link
Contributor

fw-bot commented Jan 9, 2024

@robinengels @caburj this pull request has forward-port PRs awaiting action (not merged or closed):

luanjubica pushed a commit to luanjubica/odoo-code that referenced this pull request Feb 14, 2024
Current behavior:
?In Belgium? when using a EU intracom tax, as we need to report those
special sales to the government we need to create an invoice as we need
to report the customer name, VAT number and the country where the goods
are going to end up

Steps to reproduce:
- Create an order with a product and a tax (0% EU M)
- Settle the order in the PoS and pay it (no invoice)
- Go to the accounting and check the EC Sales List report
- There is an error shown in the report

opw-3514737

closes odoo#139467

Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants