← Back to team overview

openerp-india team mailing list archive

[Bug 941837] [NEW] [6.0] ORM bug : When I duplicate data contains function field is occured exception.

 

You have been subscribed to a public bug:

Hi !

I found a bug in the ORM on V6. To reproduce it.

- I want to display create_date field of partner object on customer invoice's view.
- I created function field on object account_invoice with stored = false.
- The customer invoice's view has displayed on it but there is a error when i duplicate some customer invoices.

openerp V6 error:
" File " /server/bin/osv/orm.py", line 4093, in copy_data
del data[f]
KeyError: 'create_date'
"


It failed because 'create_date' doesn't exist in data

I fixed it:

-   elif 'function' in fields[f]:
+  elif 'function' in fields[f] and f in data:
                del data[f]

Can you help me review them?

Thanks,

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
[6.0] ORM bug : When I duplicate data contains function field is occured exception.
https://bugs.launchpad.net/bugs/941837
You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Addons.


References