@ api.multi @ api.returns('self',lambda value:value.id)def copy(self,default = None):#TDE FIXME:清除上下文/变量brol如果默认为None:default = dict (默认值或{}),如果self._context.get('variant'):#如果我们复制一个变体或创建一个变体,则保留相同的模板default ['product_tmpl_id'] = self.product_tmpl_id.id elif'name'not默认情况下:default ['name'] = self.name返回super(ProductTemplate,self).copy(default = default)