On 04 May 04:11, [email protected] wrote:
> Hii,
> 
>     This is a follow up mail regarding the previous issue 
> <https://groups.google.com/forum/#!topic/tryton/I2oaGFn2KGM> i had 
> regarding the invoice line and the account to be passed to it. The error 
> was at
> line=invoice.lines.new()
> line.account=account   #<- showed an error but the account was saved 
> properly
> 
> 
> 
> It was marked as a bug issue4719 <https://bugs.tryton.org/issue4719>.
> 
> Since the account was passed properly but showed an error i used a 
> workaround,
> 
> try:
>     line.account=account #<<----line of error
> except Exception, e:
>     pass
> print line.account #prints the correct account passed in that try block
> 
> 
> This made sure that the account was passed properly and the error was also 
> handled.
> 
> later when i tried to save the invoice, it showed me this error
> 
> UserError: ('UserError', (u'The value of the field "Account" on "Invoice" 
> is not valid according to its domain.', ''))
> 
> 
> 
> The values of account and invoice from _get_eval() has be displayed in the 
> previous issue also. While the bug is still being worked upon, may I know 
> is this "domain" error also due to the bug or is it because of something 
> else.

You should really read the code because it describes the fields and
their domains. Like that you can figure out that there is no domain on
the account field of invoice.line.
So the error must come from company record rule, so I guess you are
mixing different companies.

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

Reply via email to