FIX converted private methods called from views to public
authorRVO(OpenERP) <>
Thu, 25 Mar 2010 14:17:36 +0000 (19:47 +0530)
committerHDA (OpenERP) <hda@tinyerp.com>
Thu, 25 Mar 2010 14:17:36 +0000 (19:47 +0530)
bzr revid: hda@tinyerp.com-20100325141736-itdnr9bfe7iox4to

addons/account/account_move_line.py
addons/account/account_view.xml
addons/account_invoice_layout/account_invoice_layout.py
addons/account_invoice_layout/account_invoice_layout_view.xml

index 0adc85a..07d8e1a 100644 (file)
@@ -278,7 +278,7 @@ class account_move_line(osv.osv):
             data['amount_currency'] = v
         return data
 
-    def _on_create_write(self, cr, uid, id, context={}):
+    def on_create_write(self, cr, uid, id, context={}):
         ml = self.browse(cr, uid, id, context)
         return map(lambda x: x.id, ml.move_id.line_id)
 
@@ -733,7 +733,7 @@ class account_move_line(osv.osv):
                     state = ' colors="red:state==\'draft\'"'
 
             #xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5"%s>\n\t''' % (title, state)
-            xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="_on_create_write"%s>\n\t''' % (title, state)
+            xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write"%s>\n\t''' % (title, state)
             fields = []
 
             widths = {
index d865823..8820552 100644 (file)
                 </search>
             </field>
         </record>
-        
+
         <record id="action_account_form" model="ir.actions.act_window">
             <field name="name">List of Accounts</field>
             <field name="res_model">account.account</field>
             <field name="type">tree</field>
             <field eval="4" name="priority"/>
             <field name="arch" type="xml">
-                <tree string="Account Entry Line" editable="top" on_write="_on_create_write">
+                <tree string="Account Entry Line" editable="top" on_write="on_create_write">
                     <field name="date"/>
                     <field name="period_id"/>
                     <field name="move_id"/>
index 58f7721..2317e0c 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
 #
@@ -15,7 +15,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 
@@ -70,7 +70,7 @@ class account_invoice_line(osv.osv):
                     res[field]['states'][key] = value
         return res
 
-    def _onchange_invoice_line_view(self, cr, uid, id, type, context={}, *args):
+    def onchange_invoice_line_view(self, cr, uid, id, type, context={}, *args):
 
         if (not type):
             return {}
index 18e7996..fe11e40 100644 (file)
@@ -9,7 +9,7 @@
                        <field name="type">form</field>
                        <field name="arch" type="xml">
                                <xpath expr="/form/notebook/page/field[@name='name']" position="before">
-                                       <field name="state" select="1" on_change="_onchange_invoice_line_view(state)" />
+                                       <field name="state" select="1" on_change="onchange_invoice_line_view(state)" />
                                        <field name="sequence"/>
                                </xpath>
                        </field>