FIX converted private methods called from views to public

bzr revid: hda@tinyerp.com-20100325141736-itdnr9bfe7iox4to
This commit is contained in:
RVO(OpenERP) 2010-03-25 19:47:36 +05:30 committed by HDA (OpenERP)
parent ac581eb571
commit b170ef94fc
4 changed files with 8 additions and 8 deletions

View 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 = {

View File

@ -159,7 +159,7 @@
</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>
@ -681,7 +681,7 @@
<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"/>

View 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 {}

View 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>