Hello, I am using odoo project module on this module while creating a project task it shows project_id as Private I want to default select project_id. how can I do that?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
1476
أدوات العرض
Hi,
You can set a default value for a field by overriding. here is an example.
from odoo import fields, models
class ProjectTask(models.Model):
_inherit = 'project.task'
project_id = fields.Many2one('project.project', string='Project', default=lambda self: self.env['project.project'].search([], limit=1))
Hope this helps
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل