diff --git a/addons/profile_accounting/__init__.py b/addons/profile_accounting/__init__.py
index 1497184785b..b7dbe65518f 100644
--- a/addons/profile_accounting/__init__.py
+++ b/addons/profile_accounting/__init__.py
@@ -27,7 +27,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
-
+import profile_accounting
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_accounting/__terp__.py b/addons/profile_accounting/__terp__.py
index 80cbf278f3d..01ccadd87ae 100644
--- a/addons/profile_accounting/__terp__.py
+++ b/addons/profile_accounting/__terp__.py
@@ -33,7 +33,7 @@
"category":"Profile",
"depends":["account","report_analytic","board_account","account_followup",'invoice_payment_tab'],
"demo_xml":[],
- "update_xml":[],
+ "update_xml":["profile_accounting.xml"],
"active":False,
"installable":True,
}
diff --git a/addons/profile_accounting/profile_accounting.py b/addons/profile_accounting/profile_accounting.py
new file mode 100644
index 00000000000..a1bf4e8f1fd
--- /dev/null
+++ b/addons/profile_accounting/profile_accounting.py
@@ -0,0 +1,75 @@
+##############################################################################
+#
+# Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved.
+#
+# $Id: __terp__.py 8595 2008-06-16 13:00:21Z stw $
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# 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 2
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+###############################################################################
+
+from osv import fields, osv
+import pooler
+
+class config_install_extra_modules(osv.osv_memory):
+ _name='config.install_extra_modules'
+ _columns = {
+ 'name':fields.char('Name', size=64),
+ 'account_analytic_analysis':fields.boolean('Analytic Accounting'),
+ 'account_analytic_plans':fields.boolean('Multiple Analytic Plans'),
+ 'account_payment':fields.boolean('Suppliers Payment Management'),
+ 'account_asset':fields.boolean('Asset Management'),
+ 'hr_timesheet_invoice':fields.boolean('Invoice on Analytic Entries'),
+ 'account_budget_crossover':fields.boolean('Analytic Budgets'),
+ }
+ def action_cancel(self,cr,uid,ids,conect=None):
+ return {
+ 'view_type': 'form',
+ "view_mode": 'form',
+ 'res_model': 'ir.module.module.configuration.wizard',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+
+
+ def action_install(self, cr, uid, ids, context=None):
+ result=self.read(cr,uid,ids)
+ mod_obj = self.pool.get('ir.module.module')
+ for res in result:
+ for r in res:
+ if r<>'id' and res[r]:
+ ids += mod_obj.search(cr, uid, [('name', '=', r)])
+ mod_obj.action_install(cr, uid, ids, context=context)
+ cr.commit()
+ db, pool = pooler.restart_pool(cr.dbname, update_module=True)
+ return {
+ 'view_type': 'form',
+ "view_mode": 'form',
+ 'res_model': 'ir.module.module.configuration.wizard',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+
+
+config_install_extra_modules()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/profile_accounting/profile_accounting.xml b/addons/profile_accounting/profile_accounting.xml
new file mode 100644
index 00000000000..7d37d1704c1
--- /dev/null
+++ b/addons/profile_accounting/profile_accounting.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ Install extra modules
+ config.install_extra_modules
+ form
+
+
+
+
+
+
+ Install Extra Modules
+ ir.actions.act_window
+ config.install_extra_modules
+ form
+ form
+ new
+
+
+
+ Install Extra modules
+ Install more modules. A few modules are proposed according to the service profile you selected. You will be able to install them based on our requirements.
+
+ open
+
+
+
diff --git a/addons/profile_association/__init__.py b/addons/profile_association/__init__.py
index 01b2aa00b98..0e719215d97 100644
--- a/addons/profile_association/__init__.py
+++ b/addons/profile_association/__init__.py
@@ -26,5 +26,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
+import profile_association
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_association/__terp__.py b/addons/profile_association/__terp__.py
index be6dc21efa2..db1bfc86d97 100644
--- a/addons/profile_association/__terp__.py
+++ b/addons/profile_association/__terp__.py
@@ -6,7 +6,7 @@
"category":"Profile",
"depends":["membership", "event", "association_vertical", "board_association"],
"demo_xml":[],
- "update_xml":[],
+ "update_xml":["profile_association.xml"],
"active":False,
"installable":True,
}
diff --git a/addons/profile_association/profile_association.py b/addons/profile_association/profile_association.py
new file mode 100644
index 00000000000..cb962c77d3f
--- /dev/null
+++ b/addons/profile_association/profile_association.py
@@ -0,0 +1,73 @@
+##############################################################################
+#
+# Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved.
+#
+# $Id: __terp__.py 8595 2008-06-16 13:00:21Z stw $
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# 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 2
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+###############################################################################
+
+from osv import fields, osv
+import pooler
+
+
+class config_install_extra_modules(osv.osv_memory):
+ _name='config.install_extra_modules'
+ _columns = {
+ 'crm_configuration':fields.boolean('CRM & Calendars', help="This installs the customer relationship features like: leads and opportunities tracking, shared calendar, jobs tracking, bug tracker, and so on."),
+ 'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
+ 'project':fields.boolean('Project Management'),
+ 'event' : fields.boolean('Events Organisation'),
+ 'crm' : fields.boolean('Fund Raising'),
+ }
+ def action_cancel(self,cr,uid,ids,conect=None):
+ return {
+ 'view_type': 'form',
+ "view_mode": 'form',
+ 'res_model': 'ir.module.module.configuration.wizard',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+
+
+ def action_install(self, cr, uid, ids, context=None):
+ result=self.read(cr,uid,ids)
+ mod_obj = self.pool.get('ir.module.module')
+ for res in result:
+ for r in res:
+ if r<>'id' and res[r]:
+ ids = mod_obj.search(cr, uid, [('name', '=', r)])
+ mod_obj.action_install(cr, uid, ids, context=context)
+ cr.commit()
+ db, pool = pooler.restart_pool(cr.dbname, update_module=True)
+ return {
+ 'view_type': 'form',
+ "view_mode": 'form',
+ 'res_model': 'ir.module.module.configuration.wizard',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+
+
+config_install_extra_modules()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_association/profile_association.xml b/addons/profile_association/profile_association.xml
new file mode 100644
index 00000000000..3dd394c4ff7
--- /dev/null
+++ b/addons/profile_association/profile_association.xml
@@ -0,0 +1,45 @@
+
+
+
+
+ Install extra modules
+ config.install_extra_modules
+ form
+
+
+
+
+
+
+ Install Extra Modules
+ ir.actions.act_window
+ config.install_extra_modules
+ form
+ form
+ new
+
+
+
+ Install Extra modules
+ Install more modules. A few modules are proposed according to the service profile you selected. You will be able to install them based on our requirements.
+
+ open
+
+
+
diff --git a/addons/profile_manufacturing/__init__.py b/addons/profile_manufacturing/__init__.py
index 1497184785b..cbaf21c1bc4 100644
--- a/addons/profile_manufacturing/__init__.py
+++ b/addons/profile_manufacturing/__init__.py
@@ -27,7 +27,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
-
+import profile_manufacturing
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/profile_manufacturing/__terp__.py b/addons/profile_manufacturing/__terp__.py
index f8d07a622b2..4cc913ecb9d 100644
--- a/addons/profile_manufacturing/__terp__.py
+++ b/addons/profile_manufacturing/__terp__.py
@@ -33,7 +33,7 @@
"category":"Profile",
"depends":["mrp", "crm", "sale", "delivery","board_manufacturing"],
"demo_xml":[],
- "update_xml":[],
+ "update_xml":["profile_manufacturing.xml"],
"active":False,
"installable":True,
}
diff --git a/addons/profile_manufacturing/profile_manufacturing.py b/addons/profile_manufacturing/profile_manufacturing.py
new file mode 100644
index 00000000000..a489fd74e01
--- /dev/null
+++ b/addons/profile_manufacturing/profile_manufacturing.py
@@ -0,0 +1,75 @@
+##############################################################################
+#
+# Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved.
+#
+# $Id: __terp__.py 8595 2008-06-16 13:00:21Z stw $
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# 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 2
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+###############################################################################
+
+from osv import fields, osv
+import pooler
+
+
+class config_install_extra_modules(osv.osv_memory):
+ _name='config.install_extra_modules'
+ _columns = {
+ 'name':fields.char('Name', size=64),
+ 'mrp_jit':fields.boolean('Just in Time Scheduling'),
+ 'sale_margin':fields.boolean('Margins on Sales Order'),
+ 'crm_configuration':fields.boolean('CRM & Calendars'),
+ 'sale_journal':fields.boolean('Manage by Journals'),
+ 'project':fields.boolean('Project Management'),
+ }
+ def action_cancel(self,cr,uid,ids,conect=None):
+ return {
+ 'view_type': 'form',
+ "view_mode": 'form',
+ 'res_model': 'ir.module.module.configuration.wizard',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+
+
+ def action_install(self, cr, uid, ids, context=None):
+ result=self.read(cr,uid,ids)
+ mod_obj = self.pool.get('ir.module.module')
+ for res in result:
+ for r in res:
+ if r<>'id' and res[r]:
+ ids = mod_obj.search(cr, uid, [('name', '=', r)])
+ mod_obj.action_install(cr, uid, ids, context=context)
+ cr.commit()
+ db, pool = pooler.restart_pool(cr.dbname, update_module=True)
+ return {
+ 'view_type': 'form',
+ "view_mode": 'form',
+ 'res_model': 'ir.module.module.configuration.wizard',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+
+
+config_install_extra_modules()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/profile_manufacturing/profile_manufacturing.xml b/addons/profile_manufacturing/profile_manufacturing.xml
new file mode 100644
index 00000000000..dd976b823f2
--- /dev/null
+++ b/addons/profile_manufacturing/profile_manufacturing.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ Install extra modules
+ config.install_extra_modules
+ form
+
+
+
+
+
+
+ Install Extra Modules
+ ir.actions.act_window
+ config.install_extra_modules
+ form
+ form
+ new
+
+
+
+ Install Extra modules
+ Install more modules. A few modules are proposed according to the service profile you selected. You will be able to install them based on our requirements.
+
+ open
+
+
+
diff --git a/addons/profile_service/profile_service.py b/addons/profile_service/profile_service.py
index 6fe1f9fa632..95ac4cd6d99 100644
--- a/addons/profile_service/profile_service.py
+++ b/addons/profile_service/profile_service.py
@@ -53,13 +53,15 @@ class config_install_extra_modules(osv.osv_memory):
'target':'new',
}
def action_install(self, cr, uid, ids, context=None):
- res=self.read(cr,uid,ids)[0]
+ result=self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
- for r in res:
- if r<>'id' and res[r]:
- ids = mod_obj.search(cr, uid, [('name', '=', res[r])])
- mod_obj.download(cr, uid, ids, context=context)
- cr.commit()
+ for res in result:
+ for r in res:
+ if r<>'id' and res[r]:
+ ids = mod_obj.search(cr, uid, [('name', '=', r)])
+ mod_obj.action_install(cr,uid,ids,context=context)
+ cr.commit()
+ db, pool = pooler.restart_pool(cr.dbname, update_module=True)
return {
'view_type': 'form',
"view_mode": 'form',
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 5c50d3bead7..be472663a2e 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1196,10 +1196,14 @@ class stock_picking_move_wizard(osv.osv_memory):
def _get_move_lines(self,cr,uid,ctx):
move_obj=self.pool.get('stock.move')
picking_obj=self.pool.get('stock.picking')
- if 'action_id' in ctx:
+ if ctx.get('action_id',False):
picking=picking_obj.browse(cr,uid,[ctx['action_id']])
if picking and len(picking):
- move_line_ids=move_obj.search(cr,uid,[('state','in',['confirmed','assigned']),('address_id','=',picking[0].address_id.id)])
+ if picking[0].address_id:
+ move_line_ids=move_obj.search(cr,uid,[('state','in',['confirmed','assigned']),('address_id','=',picking[0].address_id.id)])
+ else:
+ move_line_ids=move_obj.search(cr,uid,[('state','in',['confirmed','assigned'])])
+ print move_line_ids
move_lines=move_obj.read(cr,uid,move_line_ids)
#res=[]
#for move_line in move_lines:
@@ -1208,9 +1212,9 @@ class stock_picking_move_wizard(osv.osv_memory):
return []
def _get_picking_address(self,cr,uid,ctx):
picking_obj=self.pool.get('stock.picking')
- if 'action_id' in ctx:
+ if ctx.get('action_id',False):
picking=picking_obj.browse(cr,uid,[ctx['action_id']])[0]
- return picking.address_id and picking.address_id.id
+ return picking.address_id and picking.address_id.id or False
return False
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 256ee36b4e4..2e6df6d6cc1 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1198,7 +1198,7 @@
-