Hi,
I override the class sale_order to change the object reference of the field 'partner_invoice_id' from 'res.partner' to my customize object 'addressinformation_billing' I went through restarting the server and then update the modules list and then install the my customize module. after clicking install it gave me error
Integrity Error
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set
[object with reference: addressinformation_billing - addressinformation.billing]
after pressing 'OK' i went to models and check if the object reference had been changed, and yes it changes but the customize module was not installed because of the Integrity error.
Here is my override .py code
class sale_order(osv.osv):
_name='sale.order'
_inherit='sale.order'
_columns={
'partner_invoice_id': fields.many2one('addressinformation_billing', 'Delivery Address', readonly=True, required=False, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Invoice address for current sales order."),
}
sale_order()
any advice? thanks