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,
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.'))
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
0
sept. 25
|
1495 | |||
|
how to delete a company?
Rezolvat
|
1
nov. 23
|
16996 | ||
|
3
oct. 23
|
11127 | |||
|
1
oct. 22
|
6037 | |||
|
1
mai 20
|
5369 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.