Domain for Many2One field not working in odoo
问题 I have an Entity payment (pago) with a Many2One field bill (factura). A bill could have 3 states 'creado', 'pendiente' y 'pagado'. I want to add a domain for the Many2One field: For each payment you can only select a bill in the states 'creado' y 'pendiente'. I have tried with the following code but ii is nt working class PlanificacionFactura(models.Model): _name = 'utepda_planificacion.factura' _rec_name = 'numero' _description = 'Factura' _inherit = ['mail.thread', 'mail.activity.mixin']