luc-demeyer / noviat-apps

Noviat apps.odoo.com repository
20 stars 53 forks source link

l10n_be_vat_intra #16

Open lbonjean opened 8 years ago

lbonjean commented 8 years ago

Hi,

If I try to make an intracom xml, I run into 2 problems: In file l10n_bebe_vat_intra.py line 137: seq_declarantnum is false. If I set this manual to "12345" in the debugger, it continues But gives then an error on the group by clause in line 216 that partner_id is ambigious. When I replace partner_id with l.partner_id, it works.

So I doubt if this is used in this form by other people.

Anny suggestions are appreciated.

Luc Bonjean

luc-demeyer commented 8 years ago

Which Odoo version are you running ? V6, V7, V8 ? Are you in multi-company mode ? If so, please ensure that the declarantnum sequence is shared between the companies or otherwise create a separate sequence for all companies.

lbonjean commented 8 years ago

Hi Luc, It is version 8, and indeed multicompany. I guess you mean the declarantseq sequence, by creating this for the company this one is indeed fixed.

The second one remains: (But it works by changing partner_id to l.partner id)

File "/opt/odoo/odoo-server/openerp/api.py", line 256, in wrapper return old_api(self, _args, _kwargs) File "/opt/odoo/custom/addons/l10n_be_coa_multilang/wizard/l10n_be_vat_intra.py", line 216, in _get_datas (codes, tuple([p.id for p in wiz_data.period_ids]), data_company.id)) File "/opt/odoo/odoo-server/openerp/sql_db.py", line 158, in wrapper return f(self, _args, _kwargs) File "/opt/odoo/odoo-server/openerp/sql_db.py", line 234, in execute res = self._obj.execute(query, params) ProgrammingError: column reference "partner_id" is ambiguous LINE 18: ... GROUP BY vat, intra_code, partner_name, partner_id

Thanks,

Luc

lbonjean commented 8 years ago

Hello Luc, Do you want me to fix it and generate a pull request, or do you prefer to do check this yourself?

Luc