The magic of invoice adress

Here we go again.
we have invoice history, invoice stock and invoice.

when we inserted in database (sql in postgres) adress for party we did’nt ckeck “invoice” so we are not able to “post” and invoice to those address. It says the address do not exists anymore. But that is not the question.

we, with sql, mass change to chance invoice to ‘t’ in the database (party_adress). But without success. we have to go to the address in tryton uncheck (because it is checked) and re-check the invoice box to be able to post an invoice.

It seems that there is a “cache” in tryton, that supposed to be cleared when you logout and log-in. but it do not work. i even restart tryton-server.

where is the magick ?

Data should not be insert with SQL and by passing the ORM especially when using the historization feature as you did not probably insert also row in the history table.
So I bet that your meta data (create_date and write_date) are not coherent between records nor the history tables.

You must import data either with the CSV import tool or with a proteus script.

the cvs import tool works sometime. and sometime not. you told in another topic that csv is complicated to import.

proteus script is _really complicated for just an insert into adress…

so where can i find this history table ?

and yes create_date and write date are coherent.

Could someone helps me to get a solutions for those 25 000 parties ?

Probably the problem is that you are missing the records in the __history table.
You should insert/update the same values in the historized table to make it work.

i do not understand.

when i unchecked and check invoice in a address, there is nothing added in party_address__history and it goes from non existant to ok, let’s go.

the magic should be elsewhere