wizard: on change trigger raises error in audittrail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
branch-server 1875
branch-addons official 2384
branch-addons chricar_
trunk-extra-addons 3800
Trying to modify account/
Environment Information :
System : Linux-2.
OS Name : posix
LSB Version: core-2.
Distributor ID: SUSE LINUX
Description: openSUSE 11.1 (x86_64)
Release: 11.1
Codename: n/a
Operating System Release : 2.6.27.
Operating System Version : #1 SMP 2009-08-15 17:53:59 +0200
Operating System Architecture : 64bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.0
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "/home/
result = LocalService(
File "/home/
return getattr(self, method)(*params)
File "/home/
object_
AttributeError: 'NoneType' object has no attribute '_name'
***** the modifed code ************
pay_form = '''<?xml version="1.0"?>
<form string="Pay invoice">
<field name="amount"/>
<newline/>
<field name="name"/>
<field name="date" on_change=
<field name="journal_id"/>
<field name="period_id"/>
</form>'''
pay_fields = {
'amount': {'string': 'Amount paid', 'type':'float', 'required':True},
'name': {'string': 'Entry Name', 'type':'char', 'size': 64, 'required':True},
'date': {'string': 'Payment date', 'type':'date', 'required':True},
'journal_id': {'string': 'Journal/Payment Mode', 'type': 'many2one', 'relation'
'period_id': {'string': 'Period', 'type': 'many2one', 'relation'
}
def onchange_date(self, cr, uid, date, context=None):
period_id = False
if date:
pool = pooler.
period_ids= pool.get(
if len(period_ids):
return{
see comment of Fabien http:// www.openobject. com/forum/ topic7337. html