Anup(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-5598-ach into 
lp:openobject-addons/6.0.

Requested reviews:
  Jay Vora (OpenERP) (jvo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-5598-ach/+merge/60352

Hello,

   When you enter the journal items(Account Move Lines) from Journal 
Entries(Account Moves) they don't have the period and journal of the Journal 
Entry(Account Move).

To reproduce follow the given steps,
1.Go to Accounting/Journal Entries/Journal Entries.
2. Create a new Journal Entry and select journal and period.
3. Create a new Journal Item and you'll see that period and journal are not 
coming from the journal entry(parent).

This fixes the problem.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-5598-ach/+merge/60352
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-5598-ach.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2011-05-06 15:05:22 +0000
+++ account/account_move_line.py	2011-05-09 10:11:33 +0000
@@ -553,7 +553,7 @@
         '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', False) or 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)

=== modified file 'account/account_view.xml'
--- account/account_view.xml	2011-01-20 18:28:06 +0000
+++ account/account_view.xml	2011-05-09 10:11:33 +0000
@@ -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"/>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to