client invoice refuses to use updated client name and address after saving as draft
With 6.0, we have an example of a party where the party name and addresses were corrected.
Initially there was the abbreviation of the party appended to the name which was removed.
In the addresses, there was by error two addresses created by a former employee...
- the first had only invoice checked but had in the building name field the name of the party. This was corrected by clearing the building name, then putting the party abbreviation in the party_name field, and checking both invoice and delivery options.
- the second had the same address information with only the delivery option checked this time and so was deleted, leaving only first address.
The problem is, in creating a new invoice for the party, at first the name and address are correct, but upon saving the draft (not validating nor posting yet) the name and address fields are updated to the old values.
Concerned it was a caching issue, I stopped the client and the server, and even tried a vacuumdb on the data base, but it seems impossible to get the invoice name and address to successfully use the corrected values with a new invoice after saving (as 'draft').
I checked with trytond-console, the ids for party and its address are the same in the invoice, but
party.rec_name != invoice.party.rec_name
and party.addresses[0].rec_name != invoice.invoice_address.rec_name
What could be inciting save() to update the party and address with old values from previous invoices prior to the correction?