Skip to Content
मेन्यू
This question has been flagged

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!

Avatar
Discard

Just an idea ! What, if changing the property of the field "origin" (Source Document) from char to "related"

@exxor, did you solved? I'm facing same question. Thank you

Related Posts Replies Views Activity
2
जन॰ 16
9714
1
अक्तू॰ 22
4266
1
फ़र॰ 17
3310
2
जन॰ 17
7197
3
मार्च 15
4961