issue with invoice number when exporting a Journal

36 views
Skip to first unread message

Armand Mpassy-Nzoumba

unread,
Jun 28, 2016, 7:53:06 AM6/28/16
to try...@googlegroups.com
Dear all,
I am getting the following issue when I am exporting a journal. I get different invoice number displayed on the screen than the one in my exported file.
For example in the revenue journal, the invoice number is 895. In the exported file I get account.invoice 802 (in the column origin). I assume that the field origin include the invoice number displayed on the screen.
All other data are correct.
Am I exporting the right field?

Thank you,

Armand


Sergi Almacellas Abellana

unread,
Jun 28, 2016, 8:07:55 AM6/28/16
to try...@googlegroups.com
El 28/06/16 a les 13:52, 'Armand Mpassy-Nzoumba' via tryton ha escrit:
> Dear all,
> I am getting the following issue when I am exporting a journal. I get different invoice number displayed on the screen than the one in my exported file.
> For example in the revenue journal, the invoice number is 895. In the exported file I get account.invoice 802 (in the column origin). I assume that the field origin include the invoice number displayed on the screen.

A reference field (which is the case of journal) is composed by the
model name ('account.invoice') and the record id (802 in your case).

So what you are seeing is not the invoice number but the record id and
that's because you have different numbers.


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Armand Mpassy-Nzoumba

unread,
Jun 28, 2016, 8:20:43 AM6/28/16
to try...@googlegroups.com

> On 28 Jun 2016, at 13:07, Sergi Almacellas Abellana <se...@koolpi.com> wrote:
>
>>
>
> A reference field (which is the case of journal) is composed by the model name ('account.invoice') and the record id (802 in your case).
>
> So what you are seeing is not the invoice number but the record id and that's because you have different numbers.
>

Well noted. Thank you very much for your assistance. I’ll go through the module and check the invoice number.

Kind regards,

Armand

Armand Mpassy-Nzoumba

unread,
Jun 28, 2016, 9:37:45 AM6/28/16
to try...@googlegroups.com

> On 28 Jun 2016, at 13:20, Armand Mpassy-Nzoumba <armand...@gmail.com> wrote:
>
>
>> On 28 Jun 2016, at 13:07, Sergi Almacellas Abellana <se...@koolpi.com> wrote:
>>
>>>
>>
>> A reference field (which is the case of journal) is composed by the model name ('account.invoice') and the record id (802 in your case).
>>
>> So what you are seeing is not the invoice number but the record id and that's because you have different numbers.
>>

I am getting back on this issue. My question is:
Which field should I use to export the invoice number when I display the journal-period?
I can see the invoice number but I am failing to select the right field to be exported.

Kind regards,

Armand

Sergi Almacellas Abellana

unread,
Jun 28, 2016, 9:47:30 AM6/28/16
to try...@googlegroups.com
El 28/06/16 a les 15:37, Armand Mpassy-Nzoumba ha escrit:
It's not possible to select related fields on reference fields on the
export dialog, which is the case of the origin field.

So you should add a Functional field that returns the invoice when the
origin is an Invoice and then you will be able to select all the related
fields of the invoice.

>
> Kind regards,
>
> Armand
>

Hope it helps!

Cédric Krier

unread,
Jun 28, 2016, 10:00:04 AM6/28/16
to try...@googlegroups.com
On 2016-06-28 14:37, Armand Mpassy-Nzoumba wrote:
> Which field should I use to export the invoice number when I display the journal-period?
> I can see the invoice number but I am failing to select the right field to be exported.

You can not with the CSV export because origin is a reference field
which can point to many different models. If you really need such
export, you have to add a Function field on account.move that will
compute the needed number.

Maybe an improvement will be to allow to export rec_name of Reference
fields.

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

Cédric Krier

unread,
Jun 28, 2016, 10:15:05 AM6/28/16
to try...@googlegroups.com
On 2016-06-28 15:57, Cédric Krier wrote:
> Maybe an improvement will be to allow to export rec_name of Reference
> fields.

Created: https://bugs.tryton.org/issue5667

Armand Mpassy-Nzoumba

unread,
Jun 28, 2016, 10:51:03 AM6/28/16
to try...@googlegroups.com

> On 28 Jun 2016, at 14:57, Cédric Krier <cedric...@b2ck.com> wrote:
>>
>
> You can not with the CSV export because origin is a reference field
> which can point to many different models. If you really need such
> export, you have to add a Function field on account.move that will
> compute the needed number.
>
> Maybe an improvement will be to allow to export rec_name of Reference
> fields.

Hi Cedric and Sergi,

Thank you for your proposal. It will be indeed useful to add this functionality. In my specific case I need to export the account journal to another accounting software. I have implemented GNU Health the medical center is still using another accounting software. This is te first step to convince them to fully adopt FLOSS.

Kind regards,

Armand
Reply all
Reply to author
Forward
0 new messages