From 74817fde462ab75fa0b83be9efad34cf5a639982 Mon Sep 17 00:00:00 2001 From: ced <> Date: Mon, 26 Feb 2007 13:48:42 +0000 Subject: [PATCH] ACCOUNT,PURCHASE,SALE: move project_id to line.account_analytic_id for invoice and purchase bzr revid: ced-c5ade729fa76de58ebfc442f7f70528ce58a12e0 --- doc/migrate/4.0.0-4.1.0/post.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/migrate/4.0.0-4.1.0/post.py b/doc/migrate/4.0.0-4.1.0/post.py index ed0e00f9440..a7336f7e441 100644 --- a/doc/migrate/4.0.0-4.1.0/post.py +++ b/doc/migrate/4.0.0-4.1.0/post.py @@ -79,6 +79,21 @@ cr = db.cursor() cr.execute("update sale_order_line set delay = pt.sale_delay from product_product as po, product_template as pt where product_id = po.id and po.product_tmpl_id = pt.id") cr.commit() +# --------------------------------------------------------------------------- # +# move account_invoice.project_id to account_invoice_line.account_analytic_id # +# --------------------------------------------------------------------------- # + +cr.execute("update account_invoice_line set account_analytic_id = ai.project_id from account_invoice as ai where invoice_id = ai.id") +cr.commit() + +# ------------------------------------------------------------------------- # +# move purchase_order.project_id to purchase_order_line.account_analytic_id # +# ------------------------------------------------------------------------- # + +cr.execute("update purchase_order_line set account_analytic_id = po.project_id from purchase_order as po where order_id = po.id") +cr.commit() + + # --------------- # # remove old menu # # --------------- #