今天设置crm模块权限时,联系人单加一个权限,不起作用
经反复设置,最后发现,最后一条无论如何设,不起作用。
class Partner(models.Model): _description = 'Contact' _inherit = ['format.address.mixin', 'avatar.mixin'] _name = "res.partner" _order = "display_name" def _default_category(self): return self.env['res.partner.category'].browse(self._context.get('category_id')) @api.model def default_get(self, default_fields): """Add the company of the parent as default if we are creating a child partner. Also take the parent lang by default if any, otherwise, fallback to default DB lang.""" values = super().default_get(default_fields) parent = self.env["res.partner"] if &#