Skip to content
Snippets Groups Projects

Topic/13.0/tg 432

Merged Etienne Ferriere requested to merge topic/13.0/TG-432 into branch/13.0
5 files
+ 32
1
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -18,6 +18,7 @@
#
##############################################################################
import odoo.modules.module as odoo_module_manager
from odoo import _, exceptions, models
@@ -41,6 +42,12 @@
def copy(self, default=None):
"""Override to disallow copying."""
current_test = odoo_module_manager.current_test
if current_test is not None and self.env.context.get(
"activate_copy", True
):
self = self.with_context(base_allow_copy=True)
if self._base_allow_copy or self.env.context.get("base_allow_copy"):
return super(BaseNoCopyMixin, self).copy(default=default)
Loading