GNU Health - Bugs: bug #43048, Assertion Error with datetime, it...
You are not allowed to post comments on this tracker with your current authentication level.
bug #43048: Assertion Error with datetime, it does not possible install health module
Submitter: | oscar alvarez <oscar_alv> | ||
Submitted: | Fri 22 Aug 2014 04:08:11 AM UTC | ||
Category: | Installation | Severity: | 3 - Normal |
Item Group: | None | Status: | Fixed |
Privacy: | Public | Assigned to: | meanmicio |
Open/Closed: | Closed | Release: | 2.7.0 |
Module: | health | Component: | None |
Sun 24 Aug 2014 06:12:26 PM UTC, comment #5: |
Luis Falcon <meanmicio>![]() ![]() |
Sun 24 Aug 2014 04:47:04 PM UTC, comment #4: I know is a fields.Date, and we'll use datetime.date.today() in 2.8.
What I'm saying is that is type casting it correctly, from datetime to date. Otherwise nobody would be able to use GNU Health today :)
Thanks |
Luis Falcon <meanmicio>![]() ![]() |
Sun 24 Aug 2014 03:26:22 PM UTC, comment #3: The field activation_date, require date type in this model:
activation_date = fields.Date(
But with this simple test, you can see that fail, default method.
line 24 health.py file:
datetime.datetime(2014, 8, 24, 10, 18, 28, 424916)
@staticmethod
The problem is that datetime.today() return datetime not date as the field expect. |
oscar alvarez <oscar_alv> |
Sun 24 Aug 2014 10:39:54 AM UTC, comment #2: Is type casting correctly to date - datetime.date.today() - .
Please check on the community server health.gnusolidario.org:8000 and let me know if you can reproduce the error.
For 2.8, we will your dateime.date.today anyways.
Thanks ! |
Luis Falcon <meanmicio>![]() ![]() |
Fri 22 Aug 2014 09:49:35 PM UTC, comment #1: I attached a patch that fix the value returned my default method, the right value type is Date, not Datetime. |
oscar alvarez <oscar_alv> |
Fri 22 Aug 2014 04:08:11 AM UTC, original submission:
I installed tryton 3.2 and several basic official modules, so next I try install only the health module, with
$trytond -d DATABASENAME -u health
I get this:
[Fri Aug 22 03:34:59 2014] INFO:modules:health
So trying from ui I get the same message.
So all modules was installed with pip, including trytond_health
|
oscar alvarez <oscar_alv> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 6 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2014-08-24 | meanmicio | Release | None | ![]() |
2.7.0 |
2014-08-24 | meanmicio | Status | Need Info | ![]() |
Fixed |
Open/Closed | Open | ![]() |
Closed | ||
2014-08-24 | meanmicio | Status | None | ![]() |
Need Info |
Assigned to | None | ![]() |
meanmicio | ||
2014-08-22 | oscar_alv | Attached File | - | ![]() |
Added patch_43048.diff, #31936 |
Just to double check. This is a newly created party, with the default activation date on the current GNU Health.
health26=# select name, activation_date from party_party;
name | activation_date
------------------------+-----------------
Rejon | 2014-08-24
No issues found when creating a new party and assigning it a default activation date.
But you are right, the type should be datetime.date, so no need for type casting . I just commit the changes to the default branch
Thanks Oscar !