I would like to link an existing invocie to a sale order. (Because I create a sale order, start a project and then create an invoice based on the project. And I cannot create the invoice based on the sale order as the projects sometimes strongly differ from the initial sale order.)
When I go to my database and put the correct ids in the sale_order_invoice_rel table and set the "state" field of the correct sale order in the sale_order table to "done" the outcome is exactly what I want. However I don't like to do this changes manually in the DB after every project...
I tried to set readonly=False for "state" and "invoice_ids" in the sale_order class in the sale.py file. But it looks like this had no effect (when I look at the model in Settings -> DB -> Model it still says readonly=true). I also tried to set readonly to FALSE of those fields directly in the DB in the ir_model_fields table but this also didn't work (in Model it now says readonly = false but when I add those fields to a from I cannot change the state or add invoices to the invoice list).
So how can I achieve this? Thanks for any help!
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 3/29/14, 8:40 PM|
|Seen: 861 times|
|Last updated: 5/25/15, 11:50 AM|