4afdebbb7e919878966a3b894ce99e913cf046e4
The tests in hr_holidays/tests/test_company_leave.py seem like they randomly fail if the default value for date_to is computed on a different second than the date_from (it's a dict of fields so not ordered). Cfr https://runbot.odoo.com/runbot/build/3727451 2020-07-30 08:28:32 vs 2020-07-30 08:28:31 for which date_from > date_to. I imagine the call to leave._onchange_request_parameters() is meant to fix it, but it occurs after the create() which is flushed immediately, so it's too late and the date_from/date_to SQL constraint still triggers. It could happen for real production usage too, so we might want to do something about that outside of tests. Options include: 1/ making the date_from/date_to fields writeable computed fields, with the compute method setting better defaults on both fields at once 2/ alternatively, remove the default=fields.Datetime.now and override default_get instead for deterministic defaults on both fields at once The second solution seemed to be the better one. closes odoo/odoo#55880 Taskid: 2312029 X-original-commit: 6908ea471dd18182f83c81046f0000a00898fb66 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%