2
我需要從當前表單域獲得值:獲取價值功能odoo
例:
time = fields.Many2one('time.project', domain=lambda self: self._get_time())
vehicle_id = fields.Many2one('fleet.vehicle', 'Vehicle', required=True)
def _get_time(self):
vehicle_val = Get selected vehicle id from field vehicle_id on current form.
times = self.env['project.vehicle'].search([('vehicle_id', '=', vehicle_val)
是vehicle_val是同一形式的字段 – Cherif
vehicle_id = fields.Many2one(......)是字段..... – Pointer
你是什麼意思vehicle_val =?什麼是您要查找的域 – Cherif