inherit account.invoice in new model

Asked by Mayte Montano

Hello:

I am trying to inherit account.invoice and create a new account.invoice.dummy table to be used in my custon addon; problem is that regular account.invoice workflow gets "messed-up"; when pressing "Validate" button for account.invoice I get error "Field state not found in browse_record(account.invoice.dummy, 109)".... account.invoice.dummy is being search instead of account_invoice!

My code:

__openerp__.py:
       Included dependency on 'account'

account_invoice_dummy.py:
      class account_invoice_dummy(osv.osv):
                _name = 'account.invoice.dummy'
                _inherit = ['account.invoice']
                _description = "Dummy Account Invoice Model"

Best regards!

Mayte

Question information

Language:
English Edit question
Status:
Expired
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mayte Montano (mayte-l) said :
#1

After some googling I found that function fields are causing this problem when inheriting by prototyping.

I managed to workaround by redefining all function fields in my new model. However I wonder what will happen if former inherited model is extended with new function fields?

There is a bug proposal in https://bugs.launchpad.net/openobject-server/+bug/1179971

Mayte

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.