diff --git a/addons/base_report_creator/base_report_creator.py b/addons/base_report_creator/base_report_creator.py
index 817a03e2181..8dcc10b025b 100644
--- a/addons/base_report_creator/base_report_creator.py
+++ b/addons/base_report_creator/base_report_creator.py
@@ -306,7 +306,7 @@ from
def _aggregation_error(self, cr, uid, ids):
aggregate_columns = ('int','float')
- apply_functions = ('sum','min','max','avg')
+ apply_functions = ('sum','min','max','avg','count')
this_objs = self.browse(cr, uid, ids)
for obj in this_objs:
for fld in obj.field_ids:
@@ -349,7 +349,7 @@ class report_creator_field(osv.osv):
'sequence': fields.integer('Sequence'),
'field_id': fields.many2one('ir.model.fields', 'Field'),
'report_id': fields.many2one('base_report_creator.report','Report', on_delete='cascade'),
- 'group_method': fields.selection([('group','Grouped'),('sum','Sum'),('min','Minimum'),('max','Maximum'),('avg','Average')], 'Grouping Method', required=True),
+ 'group_method': fields.selection([('group','Grouped'),('sum','Sum'),('min','Minimum'),('count','Count'),('max','Maximum'),('avg','Average')], 'Grouping Method', required=True),
'graph_mode': fields.selection([('','/'),('x','X Axis'),('y','Y Axis')], 'Graph Mode'),
'calendar_mode': fields.selection([('','/'),('date_start','Starting Date'),('date_end','Ending Date'),('date_delay','Delay'),('color','Uniq Colors')], 'Calendar Mode'),
}
diff --git a/addons/custom/__init__.py b/addons/custom/__init__.py
index 759c1ec8ac9..16559a79431 100644
--- a/addons/custom/__init__.py
+++ b/addons/custom/__init__.py
@@ -20,7 +20,5 @@
#
##############################################################################
-import custom
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+import crm_building
diff --git a/addons/custom/__terp__.py b/addons/custom/__terp__.py
index 36502b0baa9..cc6e3a187b2 100644
--- a/addons/custom/__terp__.py
+++ b/addons/custom/__terp__.py
@@ -20,15 +20,15 @@
#
##############################################################################
{
- "name" : "Module for custom developments",
+ "name" : "CRM for House Building",
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Others",
"website": "http://www.tinyerp.com",
- "description": "Sample custom module where you can put your customer specific developments.",
- "depends" : ["base"],
+ "description": "CRM",
+ "depends" : ["crm_configuration"],
"init_xml" : [],
- "update_xml" : ["custom_view.xml"],
+ "update_xml" : ["crm_build_view.xml"],
"active": False,
"installable": True
}
diff --git a/addons/custom/corporate_defaults.xml b/addons/custom/corporate_defaults.xml
deleted file mode 100644
index cef5acdd020..00000000000
--- a/addons/custom/corporate_defaults.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/custom/corporate_defaults.xsl b/addons/custom/corporate_defaults.xsl
deleted file mode 100644
index 71d940ca520..00000000000
--- a/addons/custom/corporate_defaults.xsl
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
- Tiny ERP Report
- 1cm
- 1cm
- 1cm
- 1cm
- 21cm,29.7cm
-
- a4_letter
-
-
-
-
-
-
-
- 1cm 25.4cm 20cm 25.4cm
-
-
-
-
-
-
-
-
-
- -
-
-
- Phone:
-
- Mail:
-
-
-
-
-
- 1.5cm 1.2cm 19.9cm 1.2cm
-
-
- Your contact :
-
-
-
-
-
-
-
-
-
-
- 1cm 25.4cm 20cm 25.4cm
-
-
-
-
-
-
-
-
-
- -
-
-
- Phone:
-
- Mail:
-
-
-
-
- 1.5cm 1.2cm 19.9cm 1.2cm
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/custom/corporate_sxw_header.xml b/addons/custom/corporate_sxw_header.xml
deleted file mode 100644
index 2f6f885f3ba..00000000000
--- a/addons/custom/corporate_sxw_header.xml
+++ /dev/null
@@ -1,246 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [[ company.partner_id.name ]]
-
-
- [[ company.rml_header1 ]]
-
-
-
- [[ company.partner_id.address and company.partner_id.address[0].street ]]
- [[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]
-
-
-
-
-
- Phone :
-
-
- [[ company.partner_id.address and company.partner_id.address[0].phone ]]
-
-
-
-
- Mail :
-
-
- [[ company.partner_id.address and company.partner_id.address[0].email ]]
-
-
-
-
-
-
-
-
-
-
- [[ company.rml_footer1 ]]
- [[ company.rml_footer2 ]]
- Contact : [[ user.name ]]
-
-
-
-
-
-
-
-
diff --git a/addons/custom/custom.py b/addons/custom/custom.py
deleted file mode 100644
index 0fc394d6e9f..00000000000
--- a/addons/custom/custom.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved
-# $Id$
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-from osv import osv, fields
-
-#class custom_material(osv.osv):
-# _name = 'network.material'
-# _inherit = 'network.material'
-# _columns = {
-# }
-# _defaults = {
-# }
-#custom_material()
-
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/custom/custom_report.xml b/addons/custom/custom_report.xml
deleted file mode 100644
index c7c4cedbb33..00000000000
--- a/addons/custom/custom_report.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/addons/custom/custom_view.xml b/addons/custom/custom_view.xml
deleted file mode 100644
index ebc084668b7..00000000000
--- a/addons/custom/custom_view.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml
index 2d76d88341c..7aba2d56431 100644
--- a/addons/document/document_view.xml
+++ b/addons/document/document_view.xml
@@ -113,8 +113,8 @@
-
-
+
+
@@ -125,7 +125,7 @@
-
+
@@ -151,7 +151,7 @@
-
+
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index f023436172f..2b31241c513 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -285,7 +285,7 @@ class mrp_bom(osv.osv):
'workcenter_id': wc.id,
'sequence': level,
'cycle': cycle,
- 'hour': wc_use.hour_nbr + (wc.time_start+wc.time_stop+cycle*wc.time_cycle) * (wc.time_efficiency or 1.0),
+ 'hour': float(wc_use.hour_nbr + (wc.time_start+wc.time_stop+cycle*wc.time_cycle) * (wc.time_efficiency or 1.0)),
})
for bom2 in bom.bom_lines:
res = self._bom_explode(cr, uid, bom2, factor, properties, addthis=True, level=level+10)
diff --git a/addons/mrp/schedulers.py b/addons/mrp/schedulers.py
index 2d30df02768..cd1ddcd341e 100644
--- a/addons/mrp/schedulers.py
+++ b/addons/mrp/schedulers.py
@@ -188,41 +188,40 @@ class mrp_procurement(osv.osv):
while ids:
ids=orderpoint_obj.search(cr,uid,[],offset=offset,limit=100)
for op in orderpoint_obj.browse(cr, uid, ids):
- try:
- prods = location_obj._product_virtual_get(cr, uid,
- op.location_id.id, [op.product_id.id],
- {'uom': op.product_uom.id})[op.product_id.id]
- if prods < op.product_min_qty:
- qty = max(op.product_min_qty, op.product_max_qty)-prods
- reste = qty % op.qty_multiple
- if reste>0:
- qty += op.qty_multiple-reste
- newdate = DateTime.now() + DateTime.RelativeDateTime(
- days=op.product_id.seller_delay)
- if op.product_id.supply_method == 'buy':
- location_id = op.warehouse_id.lot_input_id
- elif op.product_id.supply_method == 'produce':
- location_id = op.warehouse_id.lot_stock_id
- else:
- continue
- proc_id = procurement_obj.create(cr, uid, {
- 'name': 'OP:'+str(op.id),
- 'date_planned': newdate.strftime('%Y-%m-%d'),
- 'product_id': op.product_id.id,
- 'product_qty': qty,
- 'product_uom': op.product_uom.id,
- 'location_id': op.warehouse_id.lot_input_id.id,
- 'procure_method': 'make_to_order',
- 'origin': op.name
- })
- wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
- 'button_confirm', cr)
- wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
- 'button_check', cr)
- orderpoint_obj.write(cr, uid, [op.id],
- {'procurement_id': proc_id})
- except Exception, e:
- report.append('OP %d:\n%s\n' % (op.id, str(e)))
+ if op.procurement_id and op.procurement_id.purchase_id and op.procurement_id.purchase_id.state in ('draft','confirmed'):
+ continue
+ prods = location_obj._product_virtual_get(cr, uid,
+ op.location_id.id, [op.product_id.id],
+ {'uom': op.product_uom.id})[op.product_id.id]
+ if prods < op.product_min_qty:
+ qty = max(op.product_min_qty, op.product_max_qty)-prods
+ reste = qty % op.qty_multiple
+ if reste>0:
+ qty += op.qty_multiple-reste
+ newdate = DateTime.now() + DateTime.RelativeDateTime(
+ days=op.product_id.seller_delay)
+ if op.product_id.supply_method == 'buy':
+ location_id = op.warehouse_id.lot_input_id
+ elif op.product_id.supply_method == 'produce':
+ location_id = op.warehouse_id.lot_stock_id
+ else:
+ continue
+ proc_id = procurement_obj.create(cr, uid, {
+ 'name': 'OP:'+str(op.id),
+ 'date_planned': newdate.strftime('%Y-%m-%d'),
+ 'product_id': op.product_id.id,
+ 'product_qty': qty,
+ 'product_uom': op.product_uom.id,
+ 'location_id': op.warehouse_id.lot_input_id.id,
+ 'procure_method': 'make_to_order',
+ 'origin': op.name
+ })
+ wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
+ 'button_confirm', cr)
+ wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
+ 'button_check', cr)
+ orderpoint_obj.write(cr, uid, [op.id],
+ {'procurement_id': proc_id})
offset += len(ids)
if use_new_cursor:
cr.commit()
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 805e49b7509..8d268337dee 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -804,8 +804,8 @@