AttributeError: Couldn't find tag '<field name="to_invoice">

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby sraps » Fri Oct 09, 2009 9:16 pm

Dhariwal wrote:Now when I create the methodology, as soon as i click on create button the state becomes 'close'. While it is in closed state, i cannot add calculation etc.

It is normal, this behavior is to prevent user from changing model, during the rest of definition process, as on the closed (read only) information fields all the other setup is dependent. Imagine what would happen, if you create all the setup and then change the Model field.

Dhariwal wrote:It was not the same behavior in previous version.


It was the same behavior from the first release. Actually other fields should be read only before you press create, but this have not been implemented yet.

You have to define the model and the name of the Methodology, then press create and only then proceed to the rest of definition.

I agree that the button name is a bit misleading, have not got any idea on another name.

Actually we are improving ergonomics of these modules, as new UI features have been introduced in OpenERP 5.0.x. If you would look at the constructor forms, you would notice great improvements too, which make these modules more easy to understand.

Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby milosh » Sat Oct 10, 2009 2:21 pm

I think the problem Dhariwal is reffering to is that we cannot create a meaningful Methodology with the latest release of Invoicing module.

The problem is, that when I want to create a new Methodology then I cannot add a calculation before I hit the process button (the calculation section is grayed out).

After hitting the process button Methodology becomes "closed", but the calculation is still impossible to add, because the program keeps claiming that the form is invalid because some fields need to be corrected. I do not see any "red" field in my UI.

I have tried to create Methodology where all the fields resemble exactly the values in your demo, but still the OpenERP keeps claiming that there are errors in red fields. I even went through the inv.* obect model to disable all "required" fields and restarted my OpenErp client, but I still keep getting the "some fields need correction" error when I try to enter Calculation for Methodology.

As a result the Methodology is not tied with any product and therefore useless for creating recurring invoices...
milosh
 
Posts: 3
Joined: Sat Oct 10, 2009 2:10 pm

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby milosh » Sat Oct 10, 2009 2:33 pm

The error I am referring to points to empty ID at line 1768 in the invoicing.py:

Code: Select all
Traceback (most recent call last):
  File "modules\gui\main.pyo", line 954, in sig_win_close
  File "modules\gui\main.pyo", line 1299, in _sig_child_call
  File "modules\gui\window\form.pyo", line 435, in sig_close
  File "modules\gui\window\form.pyo", line 425, in modified_save
  File "modules\gui\window\form.pyo", line 304, in sig_save
  File "widget\screen\screen.pyo", line 426, in save_current
  File "widget\model\record.pyo", line 142, in save
  File "rpc.pyo", line 341, in __call__
  File "rpc.pyo", line 169, in rpc_exec_auth
  File "rpc.pyo", line 112, in exec_auth
  File "rpc.pyo", line 118, in execute
  File "tiny_socket.pyo", line 81, in myreceive
tiny_socket.Myexception: ('syntax error at or near ")"\nLINE 6:        WHERE id in ())\n                            ^\n', 'Traceback (most recent call last):\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/netsvc.py", line 244, in dispatch\n    result = LocalService(service_name)(method, *params)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/netsvc.py", line 73, in __call__\n    return getattr(self, method)(*params)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 583, in execute\n    res = service.execute(db, uid, object, method, *args)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 59, in wrapper\n    return f(self, dbname, *args, **kwargs)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 118, in execute\n    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 110, in execute_cr\n    return getattr(object, method)(cr, uid, *args, **kw)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/addons/account_invoicing.zip/account_invoicing/invoicing.py", line 1768, in write\n    """ % \',\'.join(map(str, log_ids))\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/sql_db.py", line 76, in wrapper\n    return f(self, *args, **kwargs)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/sql_db.py", line 120, in execute\n    res = self._obj.execute(query, params)\nProgrammingError: syntax error at or near ")"\nLINE 6:        WHERE id in ())\n                            ^\n\n')
milosh
 
Posts: 3
Joined: Sat Oct 10, 2009 2:10 pm

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby sraps » Sat Oct 10, 2009 4:31 pm

milosh wrote:I think the problem Dhariwal is reffering to is that we cannot create a meaningful Methodology with the latest release of Invoicing module.

The problem is, that when I want to create a new Methodology then I cannot add a calculation before I hit the process button (the calculation section is grayed out).


As I said, this behaviour is intentional in order to maintain working methodology...

milosh wrote:After hitting the process button Methodology becomes "closed", but the calculation is still impossible to add, because the program keeps claiming that the form is invalid because some fields need to be corrected. I do not see any "red" field in my UI.


Tried it by myself. It seems to be something different. The calculation field is writable after pressing Create, but problem is with the form validation of Calculation object. This is probably effect of "improving" ergonomics of form. I am sure this is nothing hard to fix.

We will do this on Monday.

P.S. It would be better to create a thread for each separate problem. As mixing all of them together are somewhat misleading.

Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby Dhariwal » Sat Oct 10, 2009 7:46 pm

milosh understood the problem i am having... previously i could click on create button and than add the calculation, which was fine, i could tie the product.
However when i click on create now and than try to add the calculation (tie the product), nothing happens.
Dhariwal
 
Posts: 17
Joined: Thu Oct 08, 2009 10:52 am

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby milosh » Sun Oct 11, 2009 12:44 pm

Thank you Sraps!

Dhariwal, I found partial solution (which might be helpful for bug fix as well) -- it is possible to add and validate calculations trough Web Client 5.0.6, but not trough Standalone Client 5.0.6.
milosh
 
Posts: 3
Joined: Sat Oct 10, 2009 2:10 pm

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby Dhariwal » Sun Oct 11, 2009 8:04 pm

thanks milosh, u r a super star....

it seems to be adding the calculation in the web client ... hopefully the rest of the process will go smoothly too. by the way, i had to spend whole night creating new vpc, installing v5.0.3, creating company, configuring and than older release of invoicing module and it worked like a charm (as it used to)....

many thanks for your help.
regards,
khalid
Dhariwal
 
Posts: 17
Joined: Thu Oct 08, 2009 10:52 am

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby Dhariwal » Sun Oct 11, 2009 8:40 pm

now i m having following error when i create the agreement:

attributeerror: 'agreement' object has no attribute 'onchange_payment'
Dhariwal
 
Posts: 17
Joined: Thu Oct 08, 2009 10:52 am

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby Dhariwal » Sun Oct 11, 2009 8:43 pm

and this is what i get when i save the agreement and than try to run it:

Traceback (most recent call last):
File "netsvc.pyo", line 244, in dispatch
File "netsvc.pyo", line 73, in __call__
File "service\web_services.pyo", line 639, in execute
File "service\web_services.pyo", line 619, in _execute
File "wizard\__init__.pyo", line 178, in execute
File "wizard\__init__.pyo", line 83, in execute_cr
File "C:\Program Files\OpenERP Server\addons\account_invoicing.zip\account_invoicing\wizard\inv_agreement_wizard.py", line 43, in _set_process
File "C:\Program Files\OpenERP Server\addons\account_invoicing.zip\account_invoicing\invoicing.py", line 1856, in set_process
File "C:\Program Files\OpenERP Server\addons\base\ir\ir_cron.py", line 128, in create
File "C:\Program Files\OpenERP Server\addons\base\ir\ir_cron.py", line 97, in _poolJobs
File "C:\Program Files\OpenERP Server\addons\base\ir\ir_cron.py", line 73, in _callback
File "C:\Program Files\OpenERP Server\addons\account_invoicing.zip\account_invoicing\invoicing.py", line 1587, in _prolong
File "osv\orm.pyo", line 2084, in read
File "osv\orm.pyo", line 2138, in _read_flat
File "sql_db.pyo", line 76, in wrapper
File "sql_db.pyo", line 120, in execute
ProgrammingError: operator does not exist: integer = boolean
LINE 1: SELECT "numbercall",id FROM "ir_cron" WHERE id IN (false) OR...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Dhariwal
 
Posts: 17
Joined: Thu Oct 08, 2009 10:52 am

Re: AttributeError: Couldn't find tag '<field name="to_invoice">

Postby sraps » Mon Oct 12, 2009 10:11 am

milosh wrote:The error I am referring to points to empty ID at line 1768 in the invoicing.py:

Code: Select all
Traceback (most recent call last):
  File "modules\gui\main.pyo", line 954, in sig_win_close
  File "modules\gui\main.pyo", line 1299, in _sig_child_call
  File "modules\gui\window\form.pyo", line 435, in sig_close
  File "modules\gui\window\form.pyo", line 425, in modified_save
  File "modules\gui\window\form.pyo", line 304, in sig_save
  File "widget\screen\screen.pyo", line 426, in save_current
  File "widget\model\record.pyo", line 142, in save
  File "rpc.pyo", line 341, in __call__
  File "rpc.pyo", line 169, in rpc_exec_auth
  File "rpc.pyo", line 112, in exec_auth
  File "rpc.pyo", line 118, in execute
  File "tiny_socket.pyo", line 81, in myreceive
tiny_socket.Myexception: ('syntax error at or near ")"\nLINE 6:        WHERE id in ())\n                            ^\n', 'Traceback (most recent call last):\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/netsvc.py", line 244, in dispatch\n    result = LocalService(service_name)(method, *params)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/netsvc.py", line 73, in __call__\n    return getattr(self, method)(*params)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 583, in execute\n    res = service.execute(db, uid, object, method, *args)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 59, in wrapper\n    return f(self, dbname, *args, **kwargs)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 118, in execute\n    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 110, in execute_cr\n    return getattr(object, method)(cr, uid, *args, **kw)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/addons/account_invoicing.zip/account_invoicing/invoicing.py", line 1768, in write\n    """ % \',\'.join(map(str, log_ids))\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/sql_db.py", line 76, in wrapper\n    return f(self, *args, **kwargs)\n  File "/usr/local/lib/python2.5/site-packages/openerp-server/sql_db.py", line 120, in execute\n    res = self._obj.execute(query, params)\nProgrammingError: syntax error at or near ")"\nLINE 6:        WHERE id in ())\n                            ^\n\n')


Hi,
We have found where the problem is, we understand technically happened. In order not to break something, could you explain exactly, what you were doing...

Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

PreviousNext

Return to Invoicing

cron
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED