Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1038938-mdi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1038938 in OpenERP Addons: "[trunk] Traceback on opening Journal Items"
  https://bugs.launchpad.net/openobject-addons/+bug/1038938

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1038938-mdi/+merge/121139

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/1038938 
"Traceback on opening Journal Items".

Thanks,
Divyesh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1038938-mdi/+merge/121139
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1038938-mdi.
=== modified file 'account/account.py'
--- account/account.py	2012-08-23 14:26:56 +0000
+++ account/account.py	2012-08-24 09:19:51 +0000
@@ -832,9 +832,13 @@
 
         @return: Returns a list of tupples containing id, name
         """
-        result = self.browse(cr, user, ids, context=context)
+        if not ids:
+            return []
+        # name_get may receive int id instead of an id list
+        if isinstance(ids, (int, long)):
+            ids = [ids]
         res = []
-        for rs in result:
+        for rs in self.browse(cr, user, ids, context=context):
             if rs.currency:
                 currency = rs.currency
             else:

=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2012-08-07 11:34:14 +0000
+++ account/account_move_line.py	2012-08-24 09:19:51 +0000
@@ -914,26 +914,6 @@
                 partner_obj.write(cr, uid, [partner_id], {'last_reconciliation_date': time.strftime('%Y-%m-%d %H:%M:%S')})
         return r_id
 
-    def view_header_get(self, cr, user, view_id, view_type, context=None):
-        if context is None:
-            context = {}
-        context = self.convert_to_period(cr, user, context=context)
-        if context.get('account_id', False):
-            cr.execute('SELECT code FROM account_account WHERE id = %s', (context['account_id'], ))
-            res = cr.fetchone()
-            if res:
-                res = _('Entries: ')+ (res[0] or '')
-            return res
-        if (not context.get('journal_id', False)) or (not context.get('period_id', False)):
-            return False
-        cr.execute('SELECT code FROM account_journal WHERE id = %s', (context['journal_id'], ))
-        j = cr.fetchone()[0] or ''
-        cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], ))
-        p = cr.fetchone()[0] or ''
-        if j or p:
-            return j + (p and (':' + p) or '')
-        return False
-
     def onchange_date(self, cr, user, ids, date, context=None):
         """
         Returns a dict that contains new values and context

=== modified file 'account/account_view.xml'
--- account/account_view.xml	2012-08-13 16:06:57 +0000
+++ account/account_view.xml	2012-08-24 09:19:51 +0000
@@ -1222,8 +1222,8 @@
                     <field name="move_id" string="Number (Move)"/>
                     <field name="account_id"/>
                     <field name="partner_id"/>
-                    <field name="journal_id" context="{'journal_id':self}"/>
-                    <field name="period_id" context="{'period_id':self}"/>
+                    <field name="journal_id"/>
+                    <field name="period_id"/>
                     <group expand="0" string="Group By...">
                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>

=== modified file 'account/wizard/account_move_journal.py'
--- account/wizard/account_move_journal.py	2012-08-07 11:06:16 +0000
+++ account/wizard/account_move_journal.py	2012-08-24 09:19:51 +0000
@@ -108,14 +108,14 @@
                 <group>
                     <field name="target_move"/>
                 </group>
-                %s: <label string="%s"/>
-                %s: <label string="%s"/>
+                <label string="%s"/>
+                <label string="%s"/>
                 <footer>
                     <button string="%s" name="action_open_window" default_focus="1" type="object" class="oe_highlight"/>
                     or
                     <button string="Cancel" class="oe_link" special="cancel"/>
                 </footer>
-            </form>""" % (_('Journal'), journal_string, _('Period'), period_string, open_string)
+            </form>""" % (journal_string, period_string, open_string)
 
             view = etree.fromstring(view.encode('utf8'))
             xarch, xfields = self._view_look_dom_arch(cr, uid, view, view_id, context=context)

_______________________________________________
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