← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 727939] Re: [6.1dev][account_voucher] Period not properly assigned in a multicompany environment

 

*** This bug is a duplicate of bug 720175 ***
    https://bugs.launchpad.net/bugs/720175

Thanks for the report Alberto.

But, your fix would only suffice this particular problem.
Original root has been solved by the fix on bug 720175.

Thanks.

** This bug has been marked a duplicate of bug 720175
   Multicompany - all companies are selectable for users with restricted company access
 * You can subscribe to bug 720175 by following this link: https://bugs.launchpad.net/openobject-server/+bug/720175/+subscribe

-- 
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/727939

Title:
  [6.1dev][account_voucher] Period not properly assigned in a
  multicompany environment

Status in OpenERP Modules (addons):
  New

Bug description:
  Hi all, using addons revision 4033 from 2011-02-26, I get following
  errors using 'account_voucher' module:

  * In 'invoice.py' file, the 'period_id' field of the voucher is not being assigned by default when it's created from an invoice. This makes that when '_get_period' function (line ~42) in 'account_voucher.py' is called, it gets the first period of the table. This is obviously wrong in a multicompany environment, because this search is made with the root_uid and there may be multiple periods for different companies.
  * Because of previous error, in 'account_voucher.py' file, when a voucher is validated through 'action_move_line_create' function, at the moment the account_move object is generated (line ~660), the period associated to this move is obtained directly from the voucher, not checking the 'company_id' field, resulting in a wrong validation.

  I attach a path that solves these problems. Hope it will be useful.
  Regards,



References