← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 768197] Re: currency - not multi company ready

 

Hi,

I think I'm hitting a similar issue. I'm using the 6.0 series.

I'm working with two companies, both using EUR as currency. In the
currency table, however as Ferdinand mentions above, the system has only
one set of currencies by default, all associated with the first company.
So both companies point to the same currency object.

Now, in invoice.py, onchange_company_id(), it seems that the system
expects to have on different currency object linked to each company.

        if currency_id and company_id:
            currency = self.pool.get('res.currency').browse(cr, uid, currency_id)
            if currency.company_id and currency.company_id.id != company_id:
                val['currency_id'] = False
            else:
                val['currency_id'] = currency.id
        if company_id:
            company = self.pool.get('res.company').browse(cr, uid, company_id)
            if company.currency_id.company_id and company.currency_id.company_id.id != company_id:
                val['currency_id'] = False
            else:
                val['currency_id'] = company.currency_id.id

So should I really duplicate each currency for each company? Or should
the code above be relaxed in case currencty.company_id does not mache
the invoice company_id?

Best regards,

-sbi

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/768197

Title:
  currency - not multi company ready

Status in OpenERP Modules (addons):
  New

Bug description:
  in supplier invoices it is possible to select a currency which belongs
  to another company.

  missing rule
  ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]


References