Hello,
Through the Settings/Companies, I am trying to Duplicate an existing company and get the User Error: Duplicating a company is not allowed. Please create a new company instead.
How can I fix that?
Version 16.0
thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
Through the Settings/Companies, I am trying to Duplicate an existing company and get the User Error: Duplicating a company is not allowed. Please create a new company instead.
How can I fix that?
Version 16.0
thanks
Hello ilias,
its base User Error for restricting company duplication.
Still you want to fix this then you have to override base copy method and handle the same.
import logging
from odoo import api, fields, models, tools, _, Command
class Company(models.Model):
_inherit = "res.company"
def copy(self, default=None):
_logger.warning("Duplicating a company forcefully")
#raise UserError(_('Duplicating a company is not allowed. Please create a new company #instead.'))
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
how to delete a company?
Resolvido
|
|
1
nov. 23
|
13580 | |
|
3
out. 23
|
9103 | ||
How to remove a existing company odoo 15
Resolvido
|
|
1
out. 22
|
3939 | |
|
1
mai. 20
|
3864 | ||
|
2
jul. 25
|
1695 |