Skip to content

FIX l10n_it_fatturapa_out when decimal precision is different from 2#642

Merged
tafaRU merged 1 commit into
OCA:10.0from
eLBati:10.0-fix-fatturapa-decimali
Nov 7, 2018
Merged

FIX l10n_it_fatturapa_out when decimal precision is different from 2#642
tafaRU merged 1 commit into
OCA:10.0from
eLBati:10.0-fix-fatturapa-decimali

Conversation

@eLBati

@eLBati eLBati commented Nov 6, 2018

Copy link
Copy Markdown
Member

Steps:

  • Set 'Product Price' Decimal Accuracy with Digits = 4
  • Create an invoice with 1 line with quantity = 24 and price 1.2519
  • Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519

@eLBati eLBati added this to the 10.0 milestone Nov 6, 2018

@SimoRubi SimoRubi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested in runbot and it works, just a note about the implementation

PrezzoUnitario='%.2f' % prezzo_unitario,
PrezzoUnitario=eval(
"'%.' + str(price_precision) + 'f'") % prezzo_unitario,
Quantita='%.2f' % line.quantity,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please do the same with quantity?
You could use self.env['decimal.precision'].precision_get('Product Unit of Measure')

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

NumeroLinea=str(line_no),
Descrizione=line.name,
PrezzoUnitario='%.2f' % prezzo_unitario,
PrezzoUnitario=eval(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As far as I know eval is often a bad choice, could you please format the string in some other way?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@SimoRubi done, thanks

@eLBati eLBati force-pushed the 10.0-fix-fatturapa-decimali branch 4 times, most recently from baf23df to 0440fd5 Compare November 6, 2018 21:50

@SimoRubi SimoRubi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok for me

@SimoRubi SimoRubi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works in runbot and implementation is good, could you please check why travis is red?
It looks like it was green before this PR

@eLBati eLBati force-pushed the 10.0-fix-fatturapa-decimali branch from 0440fd5 to 3ee22ad Compare November 7, 2018 08:20
 - Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
@eLBati eLBati force-pushed the 10.0-fix-fatturapa-decimali branch from 3ee22ad to af0fd02 Compare November 7, 2018 09:24
@eLBati

eLBati commented Nov 7, 2018

Copy link
Copy Markdown
Member Author

@SimoRubi 🍏

@SimoRubi SimoRubi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Finally ok for me, thanks!

@tafaRU tafaRU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Only technical review.

@tafaRU

tafaRU commented Nov 7, 2018

Copy link
Copy Markdown
Member

@eLBati, is still work in progress?

@eLBati

eLBati commented Nov 7, 2018

Copy link
Copy Markdown
Member Author

@tafaRU no

@tafaRU tafaRU merged commit aacd1c7 into OCA:10.0 Nov 7, 2018
eLBati added a commit to eLBati/l10n-italy that referenced this pull request Nov 16, 2018
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
eLBati added a commit to eLBati/l10n-italy that referenced this pull request Dec 5, 2018
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
eLBati added a commit to eLBati/l10n-italy that referenced this pull request Dec 7, 2018
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
eLBati added a commit to eLBati/l10n-italy that referenced this pull request Dec 7, 2018
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
eLBati added a commit to eLBati/l10n-italy that referenced this pull request Dec 7, 2018
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
eLBati added a commit to eLBati/l10n-italy that referenced this pull request Dec 7, 2018
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
ruben-tonetto pushed a commit to ruben-tonetto/l10n-italy that referenced this pull request Jan 17, 2019
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
SimoRubi pushed a commit to SimoRubi/l10n-italy that referenced this pull request Aug 7, 2019
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
SimoRubi pushed a commit to SimoRubi/l10n-italy that referenced this pull request Aug 7, 2019
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 6, 2020
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Dec 15, 2020
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Feb 24, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Feb 25, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Apr 2, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
SimoneVagile pushed a commit to SimoneVagile/l10n-italy that referenced this pull request Apr 22, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Apr 30, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request May 7, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
eLBati added a commit to TheMule71/l10n-italy that referenced this pull request May 21, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request May 26, 2021
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 2, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 2, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 10, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 10, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 11, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 11, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 25, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 25, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Nov 25, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Dec 15, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Dec 15, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Dec 30, 2022
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TonyMasciI pushed a commit to saydigital/l10n-italy that referenced this pull request Jan 9, 2023
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TonyMasciI pushed a commit to saydigital/l10n-italy that referenced this pull request Jan 16, 2023
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TonyMasciI pushed a commit to saydigital/l10n-italy that referenced this pull request Jan 27, 2023
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
TheMule71 pushed a commit to TheMule71/l10n-italy that referenced this pull request Mar 9, 2023
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
are-agilebg pushed a commit to are-agilebg/l10n-italy that referenced this pull request May 10, 2023
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
are-agilebg pushed a commit to are-agilebg/l10n-italy that referenced this pull request May 10, 2023
- Set 'Product Price' Decimal Accuracy with Digits = 4
 - Create an invoice with 1 line with quantity = 24 and price 1.2519
 - Export XML

In the XML you get
Quantità: 24.00
Valore unitario: 1.25
Valore totale: 30.05

While you should have
Valore unitario: 1.2519
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.

3 participants