Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3086 Visualizzazioni

Hello, so I was trying to develop my own module - I'm new to odoo btw- and I was trying to add some constraints to the date using some python code with @ api.constraints . For example I wanted to make sure the date is not before today using datetime.now() and things were working fine then I changed my timezone on windows and odoo to test somethings then reverted back to normal. Again, things were fine then after modifying the code to make the date fit my needs, it broke all date fields on Odoo. Anything that has a date field gives me one of the following error messages even though I reverted everything back and i even deleted my module that I was developing but its still bugged

Traceback:
Error: '2021-11-30' is not a correct date
    at Object.parseDate [as date] (http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:1062:7)
    at Class._parseServerValue (http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:1295:384)
    at http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:1544:544
    at Function._.each._.forEach (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:108:558)
    at Class._parseServerData (http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:1544:157)
    at http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:1589:346
    at Function._.map._.collect (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:109:270)
    at http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:1589:127
    at async Class.load (http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:1293:244)
    at async Promise.all (index 0)


Traceback:
TypeError: maxDate() Could not parse date parameter: NaN
    at TempusDominusBootstrap4.maxDate (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:3802:79)
    at Moment. (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:3774:131)
    at Function.each (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:1437:241)
    at TempusDominusBootstrap4.options (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:3774:57)
    at TempusDominusBootstrap4._int (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:3733:144)
    at TempusDominusBootstrap4.DateTimePicker (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:3731:573)
    at new TempusDominusBootstrap4 (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:3888:279)
    at Function._jQueryHandleThis (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:4018:16)
    at jQuery.fn.init._jQueryInterface [as datetimepicker] (http://localhost:8069/web/content/412-bfa96e2/web.assets_common.js:4020:223)
    at Class.start (http://localhost:8069/web/content/413-78121aa/web.assets_backend.js:678:1348)

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 24
2433
2
giu 22
4381
2
giu 18
5937
2
nov 16
13489
2
feb 24
12425