Account vouchers don't change period to the right company
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
In Progress
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
When changing the company on a voucher it doesn't set the correct period for that voucher, so it will not be able to generate the move.lines necessary latter, I attached a patch for it (I can create a branch and submit a pull request if it is preferable):
=== modified file 'account_
--- account_
+++ account_
@@ -705,6 +705,16 @@
return res
+ def onchange_
+ if context is None:
+ context ={}
+ ctx = context.copy()
+ ctx.update(
+ period_pool = self.pool.
+ pids = period_
+ if pids:
+ return {'value': {'period_id': pids[0]}}
+
def onchange_date(self, cr, uid, ids, date, currency_id, payment_
"""
@param date: latest value from user input for field date
=== modified file 'account_
--- account_
+++ account_
@@ -47,7 +47,7 @@
- <field name="company_id" widget="selection" groups=
+ <field name="company_id" widget="selection" on_change=
=== modified file 'account_
--- account_
+++ account_
@@ -156,7 +156,7 @@
- <field name="company_id" widget="selection" groups=
+ <field name="company_id" widget="selection" groups=
@@ -309,7 +309,7 @@
- <field name="company_id" widget="selection" groups=
+ <field name="company_id" widget="selection" groups=
Related branches
- qdp (OpenERP): Pending requested
-
Diff: 275 lines (+89/-33)3 files modifiedaccount_check_writing/account_voucher.py (+10/-4)
account_voucher/account_voucher.py (+66/-17)
account_voucher/voucher_payment_receipt_view.xml (+13/-12)
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | In Progress → Confirmed |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
tags: | added: voucher |
Faced the same problem , Company as well both doesn't changed.
Thank god bug report!