bugGNU Health - Bugs: bug #47754, Impossible to update products


You are not allowed to post comments on this tracker with your current authentication level.

bug #47754: Impossible to update products

Submitted by:  Cédric Krier <cedk>
Submitted on:  Thu 21 Apr 2016 02:02:44 PM UTC  
Category:  Tryton Severity:  5 - Blocker
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Luis Falcon <meanmicio>
Open/Closed:  Closed Release:  3.1.0
Module:  health_who_essential_medicines

( Jump to the original submission)

Thu 22 Jun 2017 05:48:18 PM UTC, comment #6: 

Allows to edit products (product.template) records coming from XML files.

Luis Falcon <meanmicio>
Project AdministratorIn charge of this item.
Thu 21 Apr 2016 05:39:03 PM UTC, comment #5: 

Indeed this was partially fixed by https://bugs.tryton.org/issue5176
But any way, I think there is a design issue to create products and categories via XML. Users should have the freedom to manage the way they want.

Cédric Krier <cedk>
Thu 21 Apr 2016 05:26:30 PM UTC, comment #4: 

I don't agree it is a Tryton issue. The behaviour of Tryton has always been like that. I think it is wrong to rely on an eventual fix from Tryton instead of fixing now (not in 1 year) the module.
As I said, for me  it makes no sense to create product from XML. I can understand for the medicine as it is standard data.

Cédric Krier <cedk>
Thu 21 Apr 2016 04:48:46 PM UTC, comment #3: 

It is a blocker, indeed. Didn't mean to change that value.

BTW, just created the proposal at the Tryton discuss, since it's a Tryton related issue[1]

1.- https://discuss.tryton.org/t/include-modifiable-attribute-for-xml-datafile-field-element/118

Luis Falcon <meanmicio>
Project AdministratorIn charge of this item.
Thu 21 Apr 2016 03:59:34 PM UTC, comment #2: 

Comments about wished features for Tryton is off-topic, please stay focus on the issue.

For me, it is a blocker issue because it is not possible now to set a price on the created products which makes them unusable.
I think the best option will be to not create products at all for the medicines and let the users create them manually for the medicines they want to manage. This is even more true as the prices are linked to the company and so such values have no meaning as static data.

Cédric Krier <cedk>
Thu 21 Apr 2016 03:38:35 PM UTC, comment #1: 

Hi !

It really depends on the context. A lot of the data imported in GNU Health default modules is pretty much static (WHO essential meds, ICD10 dx codes, ICD9 procedures, disease genes ... ). Those are part of the system, and changing them by a user would suppose a risk.

Actually, I think that is a Tryton limitation, because currentlly modifying a record field coming from xml is an all-or-nothing task (if the field is declared on the xml file, then becomes non-modifiable).

This is what I propose :

In the XML file, we can include a new atribute (eg, "modifiable") for the xml element that allows to modify the specific field. This will provide maximum flexibility, on which fields can be modified and which can not.

In the example of the product associated to the WHO meds, this is the situation:

The list and cost prices associated to the product are required fields, so we need to include them in the xml datafile.
If we have include the new attribute :

<field name="list_price" eval="0.0" modifiable="1"/>

Then Tryton would allow the user to modify that specific field, and it will skip the value in the xml in the future (to avoid overriding the current value).

With this design, in the WHO med products example, we have both non modifiable fields (medicament product name, category, ... ) and modifiable fields (prices). All of this while keeping data in XML format, which is the best way.

I will create a proposal in Tryton for this.


Luis Falcon <meanmicio>
Project AdministratorIn charge of this item.
Thu 21 Apr 2016 02:02:44 PM UTC, original submission:  

The products created by health_who_essential_medicines are not modifiable because they come from XML.
For me, it is always wrong to import data using XML when this data can be updated by user. It is better to use a script like 'trytond_import_zip' of 'country' module.

Cédric Krier <cedk>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by meanmicio (Posted a comment)
  • -email is unavailable- added by cedk (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-22 meanmicio StatusConfirmed => Fixed
        Assigned toNone => meanmicio
        Open/ClosedOpen => Closed
        ReleaseNone => 3.1.0
    2016-04-21 cedk Severity1 - Wish => 5 - Blocker
    2016-04-21 meanmicio CategoryNone => Tryton
    2016-04-21 meanmicio StatusWorks For Me => Confirmed
    2016-04-21 meanmicio Severity5 - Blocker => 1 - Wish
        StatusNone => Works For Me

    Back to the top

    Powered by Savane 3.7