mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[REF] bi_sql_editor : Make test independant
[FIX] bi_sql_editor : allow to pass default values in copy() function
This commit is contained in:
@@ -269,12 +269,10 @@ class BiSQLView(models.Model):
|
||||
def copy(self, default=None):
|
||||
self.ensure_one()
|
||||
default = dict(default or {})
|
||||
default.update(
|
||||
{
|
||||
"name": _("%s (Copy)") % self.name,
|
||||
"technical_name": "%s_copy" % self.technical_name,
|
||||
}
|
||||
)
|
||||
if "name" not in default:
|
||||
default["name"] = _("%s (Copy)") % self.name
|
||||
if "technical_name" not in default:
|
||||
default["technical_name"] = f"{self.technical_name}_copy"
|
||||
return super().copy(default=default)
|
||||
|
||||
# Action Section
|
||||
|
||||
Reference in New Issue
Block a user