← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 511979] Re: Install ended with error

 

For postgresql-8.4, here is what you can do :
1. launch psql -U <youropenerpusername>
2.
DROP VIEW report_account_invoice_product;

ALTER TABLE account_invoice_line ALTER COLUMN discount TYPE
numeric(16,6);

CREATE VIEW report_account_invoice_product AS SELECT min(l.id) AS id,
i.create_date AS date, to_char(date_trunc('day'::text,
(i.date_invoice)::timestamp with time zone), 'YYYY'::text) AS year,
to_char(date_trunc('day'::text, (i.date_invoice)::timestamp with time
zone), 'MM'::text) AS month, to_char(date_trunc('day'::text,
(i.date_invoice)::timestamp with time zone), 'YYYY-MM-DD'::text) AS day,
i.type, i.state, l.product_id, t.categ_id, i.partner_id,
sum(((l.quantity * (l.price_unit)::double precision) * ((1.0 -
(l.discount / 100.0)))::double precision)) AS amount, sum((l.quantity *
(l.cost_price)::double precision)) AS cost_price, sum((((l.quantity *
(l.price_unit)::double precision) * ((1.0 - (l.discount /
100.0)))::double precision) - (l.quantity * (l.cost_price)::double
precision))) AS margin, sum(l.quantity) AS quantity FROM
(((account_invoice i LEFT JOIN account_invoice_line l ON ((i.id =
l.invoice_id))) LEFT JOIN product_product p ON ((p.id = l.product_id)))
LEFT JOIN product_template t ON ((t.id = p.product_tmpl_id))) GROUP BY
t.categ_id, i.partner_id, l.product_id, i.date_invoice, i.type, i.state,
i.create_date;

\q

sudo vim /usr/local/lib/python2.6/dist-packages/openerp-
server/addons/openerp6-module/sale.py

/ALTER
dd for the line containing ALTER TABLE account_invoice_line ALTER COLUMN discount TYPE numeric(16,6);
:wq

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/511979

Title:
  Install ended with error

Status in Magento Open ERP Connector:
  Confirmed

Bug description:
  I tried to install it on a new Windows installation 5.06 but I getting
  the following error:

  Environment Information : 
  System : Windows-Vista-6.0.6002-SP2
  OS Name : nt
  Operating System Release : Vista
  Operating System Version : 6.0.6002
  Operating System Architecture : 32bit
  Operating System Locale : en_US.cp1252
  Python Version : 2.5.2
  OpenERP-Client Version : 5.0.6
  Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
    File "netsvc.pyo", line 244, in dispatch
    File "netsvc.pyo", line 73, in __call__
    File "service\web_services.pyo", line 639, in execute
    File "service\web_services.pyo", line 619, in _execute
    File "wizard\__init__.pyo", line 178, in execute
    File "wizard\__init__.pyo", line 74, in execute_cr
    File "C:\Program Files\OpenErp\OpenERP AllInOne\Server\addons\base\module\wizard\wizard_module_upgrade.py", line 92, in _upgrade_module
    File "pooler.pyo", line 62, in restart_pool
    File "pooler.pyo", line 40, in get_db_and_pool
    File "addons\__init__.pyo", line 728, in load_modules
    File "addons\__init__.pyo", line 581, in load_module_graph
    File "addons\__init__.pyo", line 366, in init_module_objects
    File "C:\Program Files\OpenErp\OpenERP AllInOne\Server\addons\magentoerpconnect_generic\sale.py", line 129, in _auto_init
    File "sql_db.pyo", line 76, in wrapper
    File "sql_db.pyo", line 120, in execute
  NotSupportedError: cannot alter type of a column used by a view or rule
  DETAIL:  rule _RETURN on view sale_journal_picking_stats depends on column "discount"