Help with tryton-tools in trytond 6.0

Hi,
Im trying to mount a Tryton demo with demo data. For this purpose i use the tryton-tools tryton_demo.py
When i try with Tryton server 6.4 the works perfect and fill db. But when i try to use with 6.0 give me error
in UPDATE SUBDIVISIONS

I checkout tryton-tools to revision b9cc32bbf2b6 ( Update demo script to 6.0 but doesnt work :frowning:

trytond.model.modelstorage.SelectionValidationError: The value "district with special status" for field "Type" in "Subdivision" is not one of the allowed options. - 

Any idea how can i solve this?

Note: I can start the tryton 6.0 server without demo correctly.

Thanks in advance!

You must use an older version of pycountry see: Issue 11128: The value "district with special status" for field "Type" in "Subdivision" is not one of the allowed options - Tryton issue tracker

1 Like

Thanks for your fast reply!

I have installed pycountry 20.7.3 (this version give me error). I tryed to downgrade pycountry 20.7.2 and works perfect :slight_smile: but in next step have error too…

trytond.modules.account_invoice.exceptions.InvoicePaymentTermDateWarning: The invoice "1" generates a payment date "06/02/2022" in the past. -

You also have to pick an older version of the demo script.
I did it and it works fine.
I bundled it in an archive with many other things, but you will find the different versions under
database_models/scripts/tryton/x.y
https://download.sisalp.net/scripts/database_models.tar.gz
Hope this helps

1 Like

I guess it is because you re-run the script on the database that was already partially filled from a run the day before. So there are invoices in the past.

1 Like