like when i select records only that records data should be present in wizard
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Proje Yönetimi
- MRP
Bu soru işaretlendi
i have solved this using below logic
from odoo import fields, models, api
class SalaryUpdateWizard(models.TransientModel):
_name = "salary.update.wizard"
_description = "Salary update wizard"
def compute_employee_id(self):
project = self.env['employee.salary'].browse(self._context.get('active_ids'))
print(project)
return project
employee_id = fields.Many2one(comodel_name="employee.salary", string="Employee Name" , default=compute_employee_id)
salary = fields.Float(string="Salary",)
def update_salary(self):
rtn = self.env['employee.salary'].browse(self._context.get("active_ids")).update({'salary': self.salary})
print(rtn)
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
2
May 25
|
1933 | ||
|
|
1
Kas 24
|
2101 | ||
|
|
2
Eki 24
|
2741 | ||
|
|
1
Eki 24
|
12330 | ||
|
|
1
Ara 22
|
4361 |