Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Integrity Error when duplicating company?

By
Gerard
on 12/1/13, 4:52 AM 1,470 views

OpenErp Version 7.0-20130623-231037

When trying to duplicate a company with "More - Duplicate" button, following error occurs:

*OpenERP Warning

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: y1= - y1=]*

All fields have been entered, except for fax, tagline, website.

How to resolve this error? Thanks Gerard

I have this error too, how to resovle it?

jack
on 4/26/14, 9:27 AM

Arrrgggghhhhhh when I saw this titled exactly as my issue I got excited. I should have known it would be just like most of OpenERP bugs and ignored.

Elephante, Sean Samborski
on 7/31/14, 12:34 AM

They've known about it since 2012 at least. https://bugs.launchpad.net/openobject-server/+bug/1071691 This must be a major issue that has lasted so long in their code. It's just a bug after all, and doesn't align with trying to change the company to Odoo and milk more money from a pricing model. Rest assured everyone, they've worked on their pricing model since 2012 and we will just have to wait for them to work on bugs.

Elephante, Sean Samborski
on 7/31/14, 12:38 AM
0

Prakash

--Prakash--
3173
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
On 7/31/14, 1:34 AM

Override Copy method to change the unique field value in res.company.

Example,

class res_company(osv.osv):
    _inherit = "res.company"

    def copy(self, cr, uid, id, default=None, context=None):
        company_name = self.read(cr, uid, [id], ['name'])[0]['name']
        default.update({'name': _('%s (copy)')% company_name})
        return super(res_company, self).copy(cr, uid, id, default, context)

 

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/1/13, 4:52 AM
Seen: 1470 times
Last updated: 3/16/15, 8:10 AM