Here is the case: I made a module so that inputted Sale Order can only be -3 days or +3 days from `datetime.datetime.now()`. On another module, I need to make a code that can only be ran in certain date in Sale Order. Let say, I need to have function `x()` to be ran on 2020-01-01 - 2020-01-02. On the mentioned date, it returns `1` otherwise it returns `0`.
In the unit test, to by pass the limitation made by the first module, I directly edit using SQL query:
```
self.env.cr.execute('UPDATE sale_order SET x_custom_date=%s WHERE id=%s;', ('2020-01-01 00:00:00', sale_order.id, ) )
```
I used to have the `x_custom_date` field changed according to the SQL query. But now, the SQL query does nothing.
Last time it works even without `self.env.commit()`. But now even `self.env.commit()` does not change the value of the `x_custom_date`.
Can someone point out any possible mistakes? The goal is to use `self.env.commit()` in unit test without commiting and change the mentioned value within the transaction.