account_invoice reports

77 views
Skip to first unread message

Richard PALO

unread,
Mar 19, 2017, 1:28:30 PM3/19/17
to tryton
I have some question concerning account_invoice reports:

1. How do I get rid of the last page, which only has a header/footer?

2. What would be the references to translate 'VAT:' to 'TVA:' in locale/fr.po
for both the company and the client/supplier?

3. I have a need to kick up price_decimal for calculations, but I don't believe
it should be the resulting display precision for unit prices, how can I set this
to a different value on the report?

4. In the file store, final format should probably be pdf, is there a way to get
pdf stored, eventually a hybrid pdf?

cheers
--
Richard PALO

Cédric Krier

unread,
Mar 19, 2017, 7:20:08 PM3/19/17
to tryton
On 2017-03-19 18:28, Richard PALO wrote:
> I have some question concerning account_invoice reports:
>
> 1. How do I get rid of the last page, which only has a header/footer?

As far as I have seen it is a bug in open/libre—office.

> 2. What would be the references to translate 'VAT:' to 'TVA:' in locale/fr.po
> for both the company and the client/supplier?

It should be the translation of the option of the Selection field type
of PartyIdentifier. But I just saw that we used a function for the
selection which makes it not translatable.
https://bugs.tryton.org/issue6374

> 3. I have a need to kick up price_decimal for calculations, but I don't believe
> it should be the resulting display precision for unit prices, how can I set this
> to a different value on the report?

You can change the format_number call for unit_price to use the digits
you want.

> 4. In the file store, final format should probably be pdf, is there a way to get
> pdf stored, eventually a hybrid pdf?

It is the result of the report that is stored. So if the report is
configured to have pdf as output, it will be stored as-is.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Richard PALO

unread,
Mar 20, 2017, 9:03:55 AM3/20/17
to tryton
Le 20/03/2017 à 00:19, Cédric Krier a écrit :
> On 2017-03-19 18:28, Richard PALO wrote:
>> I have some question concerning account_invoice reports:
>>
>> 1. How do I get rid of the last page, which only has a header/footer?
>
> As far as I have seen it is a bug in open/libre—office.
>

Reference please to the LO bugreport? work-around?

>> 2. What would be the references to translate 'VAT:' to 'TVA:' in locale/fr.po
>> for both the company and the client/supplier?
>
> It should be the translation of the option of the Selection field type
> of PartyIdentifier. But I just saw that we used a function for the
> selection which makes it not translatable.
> https://bugs.tryton.org/issue6374
>

ok, I'll test this.

>> 3. I have a need to kick up price_decimal for calculations, but I don't believe
>> it should be the resulting display precision for unit prices, how can I set this
>> to a different value on the report?
>
> You can change the format_number call for unit_price to use the digits
> you want.
>

I see that https://bugs.tryton.org/issue5386 changed the behaviour.

Seems perhaps this should be configurable, perhaps on an invoice
type basis...
e.g. on printed reports, for our case in hand, we would probably always
use the currency rounded default of cents, that is 2 decimal digits.

>> 4. In the file store, final format should probably be pdf, is there a way to get
>> pdf stored, eventually a hybrid pdf?
>
> It is the result of the report that is stored. So if the report is
> configured to have pdf as output, it will be stored as-is.
>
In the current form (that is with extra pages) neither revisable nor pdf
is correct [yet}.

BTW, in the version of OpenERP we are preparing to deprecate, when an
invoice is printed, it is simply added to attachments where it can be
managed as any other attachment (including being deleted).

This would help not only the migration issues as indicated in the
filestore topic just prior, but also in fixing the formatting issues
of invoices already posted, or even finally adopting pdf when all is
ready. In any event it helps nothing to store documents that need[ed]
editing into its final format.

cheers,
--
Richard PALO

Richard PALO

unread,
Mar 20, 2017, 2:13:04 PM3/20/17
to tryton
Le 20/03/2017 à 14:03, Richard PALO a écrit :
> Le 20/03/2017 à 00:19, Cédric Krier a écrit :
>> On 2017-03-19 18:28, Richard PALO wrote:
>>> I have some question concerning account_invoice reports:
>>>
>>> 1. How do I get rid of the last page, which only has a header/footer?
>>
>> As far as I have seen it is a bug in open/libre—office.
>>
>
> Reference please to the LO bugreport? work-around?

At least temporarily, it seems I can work-around this by deleting
the manual page break after '<for each="invoice in records">'

perhaps it's possible to put the pagebreak in a conditional if invoice <> None
upon successif records.

cheers

--
Richard PALO

Richard PALO

unread,
Mar 24, 2017, 4:00:06 AM3/24/17
to tryton
Another question I have in this report, is I'm trying
to avoid printing the 'Reference:' field if empty (mostly client invoices).

So I first tried simply putting
> <if test="invoice.origins or invoice.reference">
> </if>
around the 'Reference:' clause, but it still printed a blank 'Reference:' field.

Tried just "invoice.reference" and some other combinations to no avail.

Is there some special magic needed to add a guard here?
I doubled checked to see that it wasn't using a cached file, and that Reference was indeed empty,
so there seems to be something with the logic.
--

Richard PALO

Cédric Krier

unread,
Mar 24, 2017, 4:15:06 AM3/24/17
to tryton
I see only two possibilities:

- the report is cached because you are testing on a posted invoice

- the "invoice.origins or invoice.reference" is not false. Maybe a space
in the reference field.

Richard PALO

unread,
Mar 24, 2017, 7:31:09 AM3/24/17
to try...@googlegroups.com
Le 24/03/2017 à 09:10, Cédric Krier a écrit :
> I see only two possibilities:
>
> - the report is cached because you are testing on a posted invoice
>
> - the "invoice.origins or invoice.reference" is not false. Maybe a space
> in the reference field.
>
This was my error, I thought that tryton stored the path and not the bytes
of the report when modified in Administration->UI->Actions->Reports->Facture

If I update upon every change of the model it seems okay. Sorry for the noise.

--

Richard PALO
Reply all
Reply to author
Forward
0 new messages