error creating an invoice

error creating an invoice

Postby rbanks » Fri Oct 16, 2009 9:13 pm

I am getting the following when I try to create an invoice from the analytic line:

Traceback (most recent call last):
File "/usr/local/openerp/bin/netsvc.py", line 231, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/local/openerp/bin/netsvc.py", line 74, in __call__
return getattr(self, method)(*params)
File "/usr/local/openerp/bin/service/web_services.py", line 552, in execute
return self._execute(db, uid, wiz_id, datas, action, context)
File "/usr/local/openerp/bin/service/web_services.py", line 532, in _execute
return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
File "/usr/local/openerp/bin/wizard/__init__.py", line 178, in execute
res = self.execute_cr(cr, uid, data, state, context)
File "/usr/local/openerp/bin/wizard/__init__.py", line 83, in execute_cr
res['action'] = result_def['action'](self, cr, uid, data, context)
File "/usr/local/openerp/bin/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py", line 138, in _do_create
(account.id, data['ids'], product_id, factor_id))
File "/usr/local/openerp/bin/sql_db.py", line 76, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/openerp/bin/sql_db.py", line 118, in execute
res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = integer[]
LINE 1: ...ccount_analytic_line WHERE account_id=44 AND id IN (ARRAY[...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

Any idea what is happening?
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: error creating an invoice

Postby sraps » Mon Oct 19, 2009 4:15 pm

Hi,
please try to use our module instead of hr_timesheet_invoice. Our module is more advanced and we can provide bugfix for it.

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

Re: error creating an invoice

Postby rbanks » Tue Oct 20, 2009 12:30 am

Ok, but would you please tell me the steps to use your module to invoice the analytic entry?
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: error creating an invoice

Postby sraps » Wed Oct 21, 2009 9:57 am

Hi,
account_invoice_create module completely replaces wizard from hr module, as it is not needed anymore.

When you have analytic entries defined, select them, then press Action button and following is more or less self explanatory.

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

Re: error creating an invoice

Postby rbanks » Thu Oct 22, 2009 1:44 am

I keep getting the following even after restarting:

Traceback (most recent call last):
File "/usr/local/openerp/bin/netsvc.py", line 231, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/local/openerp/bin/netsvc.py", line 74, in __call__
return getattr(self, method)(*params)
File "/usr/local/openerp/bin/service/web_services.py", line 496, in execute
res = service.execute(db, uid, object, method, *args)
File "/usr/local/openerp/bin/osv/osv.py", line 59, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/openerp/bin/osv/osv.py", line 119, in execute
res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/openerp/bin/osv/osv.py", line 111, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/openerp/bin/osv/orm.py", line 1059, in fields_view_get
result['arch'] = _inherit_apply_rec(result['arch'], sql_res[3])
File "/usr/local/openerp/bin/osv/orm.py", line 1055, in _inherit_apply_rec
result = _inherit_apply(result, inherit)
File "/usr/local/openerp/bin/osv/orm.py", line 1015, in _inherit_apply
raise AttributeError(_("Couldn't find tag '%s' in parent view !") % tag)
AttributeError: Couldn't find tag '<field name="to_nvoice">' in parent view !
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: error creating an invoice

Postby sraps » Thu Oct 22, 2009 9:27 am

Hi,
this is very interesting, as we have no such string anywhere in the code.
<field name="to_nvoice">'

Pay attention "to_nvoice" has to be "to_invoice"...

Try to reinstall Invoicing and HR module groups.

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

Re: error creating an invoice

Postby rbanks » Thu Oct 22, 2009 6:40 pm

It looks like the error is coming form the account_invoice_wizard.xml file

<field name="arch" type="xml">
<field name="to_invoice" position="before">
<field name="invoice_id"/>
</field>

Even though I changed the typo to_nvoice back to to_invoice I still get the following error when I try to view an agreement or the list of analytic entries:

Traceback (most recent call last):
File "/usr/local/openerp/bin/netsvc.py", line 231, in dispatch
result = LocalService(service_name)(method, *params)
File "/usr/local/openerp/bin/netsvc.py", line 74, in __call__
return getattr(self, method)(*params)
File "/usr/local/openerp/bin/service/web_services.py", line 496, in execute
res = service.execute(db, uid, object, method, *args)
File "/usr/local/openerp/bin/osv/osv.py", line 59, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/openerp/bin/osv/osv.py", line 119, in execute
res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/openerp/bin/osv/osv.py", line 111, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/openerp/bin/osv/orm.py", line 1059, in fields_view_get
result['arch'] = _inherit_apply_rec(result['arch'], sql_res[3])
File "/usr/local/openerp/bin/osv/orm.py", line 1055, in _inherit_apply_rec
result = _inherit_apply(result, inherit)
File "/usr/local/openerp/bin/osv/orm.py", line 1015, in _inherit_apply
raise AttributeError(_("Couldn't find tag '%s' in parent view !") % tag)
AttributeError: Couldn't find tag '<field name="to_invoice">' in parent view !
Last edited by rbanks on Fri Nov 13, 2009 5:16 pm, edited 1 time in total.
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: error creating an invoice

Postby sraps » Fri Oct 23, 2009 11:09 am

Hi,
have done several minor changes in account_invoice_create module. I do not know if it will resolve this error, so you can try them.

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

Re: error creating an invoice

Postby rbanks » Fri Oct 23, 2009 3:56 pm

I got it to work by changing <field name="to_invoice">' to <field name="amount">' Not sure why this is happening as the to_invoice field is in the parent table too. I think it is an OpenERP issue or the version that I am running although I don't recall it doing this in the past.
rbanks
 
Posts: 26
Joined: Sat Jun 13, 2009 1:19 am

Re: error creating an invoice

Postby sraps » Mon Oct 26, 2009 11:09 am

rbanks wrote:I got it to work by changing <field name="to_invoice">' to <field name="amount">' Not sure why this is happening as the to_invoice field is in the parent table too. I think it is an OpenERP issue or the version that I am running although I don't recall it doing this in the past.



Could you please post the whole code of this view!
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Next

Return to Invoicing

cron
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED