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:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
2
الردود
6918
أدوات العرض
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
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل
Hope these tips will help you: https://old.reddit.com/r/learnodoo/