← Back to team overview

openerp-india team mailing list archive

[Bug 1077029] Re: [6.1 / trunk] bank_statement multicompany error

 

Hello Amit,

I just tried again with a fresh update of the 7.0 branch, and could
reproduce the issue, and confirm it is fixed with the patch I attached
above.

Here is a more detailed instruction to reproduce:
- install trunk with demo data
- configure Belgium account chart for default company (Your Company)
- enable multi-company in the general settings
- give multi company rights to Administrator
- configure the custom account chart for Company "OpenERP Editor" 
- make sure Administrator has access to OpenERP Editor and has Your Company as preferred company
- rename the Bank journals for Your Company and OpenERP Editor so you can distinguish them
- create a bank statement -> the form shows 
  * Journal: Bank (Your Company) 
  * Period: X 12/2012 (Your Company) 
  * Company: Your Company
- change journal to Bank (OpenERP Editor)
- try to save -> ValidateError: Error occurred while validating the field(s) journal_id,period_id: The journal and period chosen have to belong to the same company. This is because the period is incorrect
- change period to 01/2012 (OpenERP Editor)
-> at this point, journal, period and company match
- try to save again -> same error for no obvious reason

Best regards,

-sbi


** Changed in: openobject-addons
       Status: Incomplete => New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1077029

Title:
  [6.1 / trunk] bank_statement multicompany error

Status in OpenERP Addons (modules):
  New

Bug description:
  Hello,

  In trunk and 6.1, it is not possible to create bank statements for
  another company.

  How to reproduce:
  - install trunk with demo data
  - configure an account chart for another company than Your Company (eg OpenERP Editor)
  - make sure Administrator has access to OpenERP Editor and has Your Company as preferred company
  - create a bank statement and change the journal to the bank journal of OpenERP Editor
  - try to save -> ValidateError: Error occurred while validating the field(s) journal_id,period_id: The journal and period chosen have to belong to the same company. This is because the period is incorrect
  - change the period to a period of OpenERP Editor 
  - try to save again -> same error for no obvious reason

  I think this is due to the fact that in the orm create method, the
  validation of related fields (company_id) is done before calculating
  related fields.

  Best regards,

  -sbi

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1077029/+subscriptions


References