summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnup (OpenERP) <ach@tinyerp.com>2011-05-12 17:52:12 +0530
committerAnup (OpenERP) <ach@tinyerp.com>2011-05-12 17:52:12 +0530
commite28a2d7ec91030b7dbcdaddf4dbe281aa3172f56 (patch)
tree095b4f7d7d36d89201aae0b6b45cb945ff6b7742
parentbc72166e65e8239be1702f42ce6fee2362e552fc (diff)
parent752023b8515b955ecb8465d5971157bf780fe9ba (diff)
[FIX] account : Move lines take the Journal and Period from the Move itself(Maintenance Case 5598)
bzr revid: ach@tinyerp.com-20110512122212-hzr9u49p4w4b2133
-rw-r--r--addons/account/account_move_line.py2
-rw-r--r--addons/account/account_view.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 91a15e8189e..c7eb101f77c 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -553,7 +553,7 @@ class account_move_line(osv.osv):
'date_created': lambda *a: time.strftime('%Y-%m-%d'),
'state': 'draft',
'currency_id': _get_currency,
- 'journal_id': lambda self, cr, uid, c: c.get('journal_id', False),
+ 'journal_id': lambda self, cr, uid, c: c.get('journal_id', c.get('journal',False)),
'account_id': lambda self, cr, uid, c: c.get('account_id', False),
'period_id': lambda self, cr, uid, c: c.get('period_id', False),
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.move.line', context=c)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 1812e800880..668ae4763d6 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1326,7 +1326,7 @@
</group>
<notebook colspan="4">
<page string="Journal Items">
- <field colspan="4" name="line_id" nolabel="1" height="250" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
+ <field colspan="4" name="line_id" nolabel="1" height="250" widget="one2many_list" default_get="{'lines':line_id , 'journal':journal_id, 'period_id':period_id}">
<form string="Journal Item">
<group col="6" colspan="4">
<field name="name"/>