Comments (4)
@bosd : Would you agree if we add your UBL invoice to the automated test suite, so that when the bug is fixed (I plan to work on it this month) we are sure it doesn't "come back" ? Do you want to anonymise some stuff in the XML before adding it to the test suite ?
from edi.
This is what happens for the 1st line: it reads:
<cbc:InvoicedQuantity unitCode="LTR">70.31</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">71.41</cbc:LineExtensionAmount>
So it writes in invoice line:
qty = 70.31
price unit = 71.41 / 70.31 = 1.01564
As the decimal precision for price unit is 2 by default, it writes price unit = 1.01 (should be 1.02...)
So the subtotal is 1.01 * 70.31 = 71.01
I see 3 solutions for this:
a) higher decimal precision for price unit => I exclude this solution because it impacts all invoices, including customer invoices
b) when this case happens, write:
qty = 1
price unit = price subtotal = 71.41
We loose the information about the exact qty...
c) keep the current behavior and add a line "Adjustement" which has the difference between the total untaxed computed by Odoo and the total untaxed of the invoice.
For the moment, I prefer option c (even if, in this particular case for gas, loosing the info of the qty is not important, so option b would be fine). @bosd what do you think ?
from edi.
@alexis-via
Yes you may use the UBL file in the test suite. It is already annonimzed. As the adress is on sesamestreet :)
Well, maybe it is in my lack of knowledge of odoo. But I was expecting to have the quantity and price unit to be dynamic. Though that will be more something into the core of odoo.
As a sollution I also prefer option C . So the total quantity of the product will still be visible.
from edi.
I implemented option c) on v10 tonight and I'm pretty happy with the result. I have 2 levels of adjustments:
- when, for a particular line, the price_subtotal is different between odoo and the XML file -> il create an adjustment line related to that line (same properties, same taxes, etc..)
- after those per-line adjustement, if there is still a difference between the amount_untaxed in Odoo and the monetary summation in the XML, I add a global adjustment line that has no tax and no product.
I added the invoice of this bug report to the automated test suite. I'll push the code to github when @bosd will confirm he agrees on that.
from edi.
Related Issues (20)
- Documentation required HOT 8
- Question regarding OVH authentication HOT 4
- [14.0] Can't find "endpoint" module required for edi_endpoint_oca HOT 1
- edi_oca: exchange dependency HOT 3
- [14.0] edi_storage_oca with SFTP backend ACK aren't synchronized HOT 3
- 14.0 edi_oca synchronize ACK state with parent state when parent isn't processed by itself HOT 5
- Proposed changes for account_invoice_import v16 HOT 3
- Proposal for sale_order_import_csv: migration and import profiles HOT 1
- account_invoice_facturx: Mandatory country issue HOT 7
- Build red on 14.0 and 15.0 branch HOT 1
- pdf_helper.: PDF file parsing failed: '/Names' HOT 4
- account_invoice_facturx: Invoice generated are not valid facturx
- PyPDF2 usage problem in pdf_helper 16.0 HOT 2
- Migration to version 17.0 HOT 6
- [14.0] account_invoice_ubl_peppol tests broken
- Invalid XML invoice according to Mustang app if invoice and company have different currency HOT 1
- product.uom missing for Module account_invoice_import_facturx HOT 1
- Use import simple pdf module with email attachments HOT 1
- [15.0] edi_oca: support multicompany with edi.exchange.record HOT 3
- [14.0] Unable to install edi_webservice_oca, element '<notebook>' cannot be located in parent view
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edi.