partner_id = fields.Many2one ( 'res.partner' , string = 'Customer Name')above field give all customer name problem is how can i give default name to this field. thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
2
Respuestas
6860
Vistas
Hi,
You can use the following code for selecting default value your field
def _default_partner(self):Otherwise you can set the default value from the odoo itself.You can refer the following blog for that purpose.
return self.env['res.partner'].search([('name', '=', 'NAME OF THE PARTNER')], limit=1).id
partner_id = fields.Many2one ( 'res.partner' , string = 'Customer Name',default=_default_partner)
https://www.cybrosys.com/blog/how-to-set-and-remove-user-defined-default-in-odoo
Regards
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse
Hope these tips will help you: https://old.reddit.com/r/learnodoo/