Account Move template logics, keywords

123 views
Skip to first unread message

Artem Braga

unread,
Feb 9, 2017, 8:45:06 AM2/9/17
to tryton
Hello.

I'm facing the issue with Move Template. I'd like to post my case below.

Im creating AccountMoveTemplate with the following required  Keywords:

1. Name: Supplier, Type: Party, String: Vendor
2. Name: date of transaction, Type: Date, String: date of transaction
3. Name: description, Type: Char, String: transaction description

When I use Wizard to create move from template, the expectation is the following

1. By selecting Party, I will get the same Party value in the "Party" field of the account move line of the drafted Account.Move
2. By selecting the date of transaction, I will get the same date value in the "Effective Date" in the  drafted Account.Move
3. By filling in transaction description, I will get a short summary of transaction in the "Description" field of the account move line of the drafted Account.Move

However, all these 3 required values entered in the Wizard to create move from template are missing in the Drafted Account.Move.

Am I missing the logics and flow of Account.Move template concept or there is an issue in configuration/other?

Thank you
Artem

Sergi Almacellas Abellana

unread,
Feb 9, 2017, 8:55:40 AM2/9/17
to try...@googlegroups.com
El 09/02/17 a les 13:44, 'Artem Braga' via tryton ha escrit:
You should declare where those fields will be used using substitution.
So following your example, you should enter the following values on the
MoveTemplate fields:

Description: {description}
Date: {date of transaction}
And on the lines that need that party value you should enter the
{Supplier} substitution.

Note that substitutions are composed by braches surrounding the name of
the keyword to substitute.

Hope it helps.


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

Artem Braga

unread,
Feb 10, 2017, 3:40:10 PM2/10/17
to tryton
Sergi, thank you so much with this explanation. 

I'm still facing an issue when creating Account.Move.Template. 

So, I create a template to book miscalleneous expenes:

Keywords: 
- name: party
- string: party
- type: Party
- Put this keyword as required. 

Template: 
-Journal: Expenses
-Line 1. Debit account Main Expense. In the Party field I put substitution {party} and amount value 0
-Line 2. Credit account Main Payable. In the Party field I put substitution {party} and amount value 0
-Both accounts Main Payable and Main Expense are tagged as party required. 

Now, when I'm creating a Move from this Template, I get a dialog window where with party selection. I select a Party-supplier and press Create button. After this I get an error: The field "Party" on "Account Move Line" is required.

What can be the reason for such error? 

thank you 
Artem 











четверг, 9 февраля 2017 г., 15:55:40 UTC+2 пользователь Sergi Almacellas Abellana написал:

Cédric Krier

unread,
Feb 10, 2017, 4:15:06 PM2/10/17
to tryton
On 2017-02-10 12:30, 'Artem Braga' via tryton wrote:
> Sergi, thank you so much with this explanation.
>
> I'm still facing an issue when creating Account.Move.Template.
>
> So, I create a template to book miscalleneous expenes:
>
> Keywords:
> - name: party
> - string: party
> - type: Party
> - Put this keyword as required.
>
> Template:
> -Journal: Expenses
> -Line 1. Debit account Main Expense. In the Party field I put substitution
> {party} and amount value 0
> -Line 2. Credit account Main Payable. In the Party field I put substitution
> {party} and amount value 0
> -Both accounts Main Payable and Main Expense are tagged as party required.
>
> Now, when I'm creating a Move from this Template, I get a dialog window
> where with party selection. I select a Party-supplier and press Create
> button. After this I get an error: The field "Party" on "Account Move Line"
> is required.
>
> What can be the reason for such error?

The value of the template line for party field must be the name of the
field (without the braces).

I have made a patch to improve the tooltips following [1]:
https://tryton-rietveld.appspot.com/34691002


[1] https://discuss.tryton.org/t/how-to-write-tooltips/212


PS: Please do not top-post on this mailing list, see
http://groups.tryton.org/netiquette
--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Artem Braga

unread,
May 8, 2017, 7:30:05 AM5/8/17
to tryton
Thanks for the answers provided on constructing Account Move Templates. 

There are two more questions on this subject: 

1. I try to create account move template with the possibility to define a date for the move.
Keyword Name: dd
Keyword Type: date
Input field: Date 
Input format: {dd}

When a move is created from the template, I get a warning:  "The field "Effective Date" on "Account Move" is required."  How to set-up an effective move date in the template? Any other possibilities to overcome this warning? 

2. I try to create account move template with the possibility to define different debit and credit amounts for the Amounts Fields in Move Lines.
Keyword Name: am
Keyword Type: numeric
Keyword Digits: 0.00

Input field Debit Line Amount: {am}
Input field Credit Line Amount: {am}

When creating a move from such a template, the following mistake is returned: "Set is not available in this evaluator"
Is it a bug or improper amount settings for the Move Template? What should be a proper configuration of Move Template to define amounts for a move? 

Thank you 
Best regards
Artem  

Cédric Krier

unread,
May 10, 2017, 5:25:07 PM5/10/17
to tryton
On 2017-05-08 03:52, 'Artem Braga' via tryton wrote:
> Thanks for the answers provided on constructing Account Move Templates.
>
> There are two more questions on this subject:
>
> 1. I try to create account move template with the possibility to define a
> date for the move.
> Keyword Name: dd
> Keyword Type: date
> Input field: Date
> Input format: {dd}
>
> When a move is created from the template, I get a warning: "The field
> "Effective Date" on "Account Move" is required." How to set-up an
> effective move date in the template? Any other possibilities to overcome
> this warning?

As the tooltip of the field date of the template said, you can leave it
empty for today or you have to put a keyword as value.

> 2. I try to create account move template with the possibility to define
> different debit and credit amounts for the Amounts Fields in Move Lines.
> Keyword Name: am
> Keyword Type: numeric
> Keyword Digits: 0.00
>
> Input field Debit Line Amount: {am}
> Input field Credit Line Amount: {am}
>
> When creating a move from such a template, the following mistake is
> returned: "Set is not available in this evaluator"
> Is it a bug or improper amount settings for the Move Template? What should
> be a proper configuration of Move Template to define amounts for a move?

I never see this error message and it is not from Tryton (at least this
string does not exist in Tryton).

Artem Braga

unread,
Aug 21, 2017, 10:00:43 AM8/21/17
to tryton
I get the same mistake in Tryton 4.4. demo version, using GTK client as well.


Sergi Almacellas Abellana

unread,
Aug 21, 2017, 10:23:15 AM8/21/17
to try...@googlegroups.com
El 21/08/17 a les 16:00, 'Artem Braga' via tryton ha escrit:
I managed to reproduce the error. The problem is that you used {} to
sorround the am variable. You just have to use "am" (without quotes) to
make it work correctly.

Artem Braga

unread,
Aug 21, 2017, 10:48:41 AM8/21/17
to tryton
Thank you, Sergi.

Now account move template works great!

Reply all
Reply to author
Forward
0 new messages