[Openerp-community-reviewer] [Merge] lp:~akretion-team/partner-contact-management/add-partner_relation into lp:partner-contact-management

2014-05-22 Thread Alexis de Lattre
Alexis de Lattre has proposed merging 
lp:~akretion-team/partner-contact-management/add-partner_relation into 
lp:partner-contact-management.

Requested reviews:
  Partner and Contact Core Editors (partner-contact-core-editors)

For more details, see:
https://code.launchpad.net/~akretion-team/partner-contact-management/add-partner_relation/+merge/220726

This merge proposal adds a new module partner_relation. Here is the description 
:

===
This module adds relations between partners. The type of relation is 
configurable ; it supports symetric and asymetric relations.

For example, you will be able to define on the form view of partner A that :

* Partner A is a competitor of Partner B (symetric relation : B is a competitor 
of A),

* Partner A has been recommended by Partner C (asymetric relation : C 
recommands A),

* Partner A is the editor of Partner D (asymetric relation : D is the 
integrator of A).

The relations that you define on Partner A towards Partner B will automatically 
be visible on the form view of Partner B.


Technically, it is not easy to implement in OpenERP. This implementation 
inherit the create() of the relation object to automatically generate a reverse 
relation (src_partner_id and dest_partner_id are swapped and the type of 
relation is the reverse if the relation is asymetric).

I have tried other implementations that would avoid to create a double entry 
for each relation, but all the other implementations were not good enough 
because I wanted relations to be simple and easy-to-use inside the partner form 
view.

This module is flake8 compliant, has demo data, ACLs, POT file and even an icon 
! :)
-- 
https://code.launchpad.net/~akretion-team/partner-contact-management/add-partner_relation/+merge/220726
Your team Partner and Contact Core Editors is requested to review the proposed 
merge of lp:~akretion-team/partner-contact-management/add-partner_relation into 
lp:partner-contact-management.
=== added directory 'partner_relation'
=== added file 'partner_relation/__init__.py'
--- partner_relation/__init__.py	1970-01-01 00:00:00 +
+++ partner_relation/__init__.py	2014-05-22 21:44:09 +
@@ -0,0 +1,23 @@
+# -*- encoding: utf-8 -*-
+##
+#
+#Partner Relation module for OpenERP
+#Copyright (C) 2014 Artisanat Monastique de Provence (www.barroux.org)
+#@author: Alexis de Lattre 
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU Affero 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 Affero General Public License for more details.
+#
+#You should have received a copy of the GNU Affero General Public License
+#along with this program.  If not, see .
+#
+##
+
+from . import partner_relation

=== added file 'partner_relation/__openerp__.py'
--- partner_relation/__openerp__.py	1970-01-01 00:00:00 +
+++ partner_relation/__openerp__.py	2014-05-22 21:44:09 +
@@ -0,0 +1,57 @@
+# -*- encoding: utf-8 -*-
+##
+#
+#Partner Relation module for OpenERP
+#Copyright (C) 2014 Artisanat Monastique de Provence (www.barroux.org)
+#@author: Alexis de Lattre 
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU Affero 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 Affero General Public License for more details.
+#
+#You should have received a copy of the GNU Affero General Public License
+#along with this program.  If not, see .
+#
+##
+
+
+{
+'name': 'Partner Relation',
+'version': '0.1',
+'category': 'Partner',
+'license': 'AGPL-3',
+'summary': 'Adds relations between partners',
+'description': """
+Partner Relation
+
+
+This module adds relations between partners. The type of relation is configurable ; it supports symetric and asymetric relations.
+
+For example, you will be able to define on the form view of partner A that :
+
+* Partner A is a competitor of Partner B (sy

[Openerp-community-reviewer] [Bug 1322248] [NEW] GTK client assertion error

2014-05-22 Thread Daniel Campos (Avanzosc)
Public bug reported:

I have this error when I go to accounting -> customers -> customer invoices and 
try to make an concatenated OR filter.
I tried in other objets like product.product or res.partner and this doesn't 
happen, don't know if it is truly a gtk client error.

** Affects: ocb-addons
 Importance: Undecided
 Status: New

** Attachment added: "assertion_error.png"
   
https://bugs.launchpad.net/bugs/1322248/+attachment/4117646/+files/assertion_error.png

-- 
You received this bug notification because you are a member of OpenERP
Community Backports, which is subscribed to OpenERP Community Backports
(Addons).
https://bugs.launchpad.net/bugs/1322248

Title:
  GTK client assertion error

Status in OpenERP Community Backports (Addons):
  New

Bug description:
  I have this error when I go to accounting -> customers -> customer invoices 
and try to make an concatenated OR filter.
  I tried in other objets like product.product or res.partner and this doesn't 
happen, don't know if it is truly a gtk client error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ocb-addons/+bug/1322248/+subscriptions

-- 
Mailing list: https://launchpad.net/~openerp-community-reviewer
Post to : openerp-community-reviewer@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community-reviewer
More help   : https://help.launchpad.net/ListHelp


[Openerp-community-reviewer] [Merge] lp:~cedric-lebrouster/ocb-server/ocb-7.0-bug-1322191-db_maxconn into lp:ocb-server

2014-05-22 Thread Cedric Le Brouster(OpenFire)
Cedric Le Brouster(OpenFire) has proposed merging 
lp:~cedric-lebrouster/ocb-server/ocb-7.0-bug-1322191-db_maxconn into 
lp:ocb-server.

Requested reviews:
  OpenERP Community Backports (ocb)
Related bugs:
  Bug #1322191 in OpenERP Server: "db_maxconn config parameter doesn't work"
  https://bugs.launchpad.net/openobject-server/+bug/1322191

For more details, see:
https://code.launchpad.net/~cedric-lebrouster/ocb-server/ocb-7.0-bug-1322191-db_maxconn/+merge/220666

Close database connections before removing them.
Fixes bug lp:1322191
-- 
https://code.launchpad.net/~cedric-lebrouster/ocb-server/ocb-7.0-bug-1322191-db_maxconn/+merge/220666
Your team OpenERP Community Backports is requested to review the proposed merge 
of lp:~cedric-lebrouster/ocb-server/ocb-7.0-bug-1322191-db_maxconn into 
lp:ocb-server.
=== modified file 'openerp/sql_db.py'
--- openerp/sql_db.py	2014-04-09 15:16:59 +
+++ openerp/sql_db.py	2014-05-22 14:50:38 +
@@ -430,6 +430,8 @@
 for i, (cnx, used) in enumerate(self._connections):
 if not used:
 self._connections.pop(i)
+if not cnx.closed:
+cnx.close()
 self._debug('Removing old connection at index %d: %r', i, cnx.dsn)
 break
 else:

-- 
Mailing list: https://launchpad.net/~openerp-community-reviewer
Post to : openerp-community-reviewer@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community-reviewer
More help   : https://help.launchpad.net/ListHelp


[Openerp-community-reviewer] [Merge] lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi into lp:partner-contact-management

2014-05-22 Thread Nicolas Bessi - Camptocamp
Nicolas Bessi - Camptocamp has proposed merging 
lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi into 
lp:partner-contact-management.

Requested reviews:
  Partner and Contact Core Editors (partner-contact-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/partner-contact-management/7.0-add_birthdate_nbi/+merge/220637

Add a simple module to add birthdate (in date format) on partner, contact form
-- 
https://code.launchpad.net/~camptocamp/partner-contact-management/7.0-add_birthdate_nbi/+merge/220637
Your team Partner and Contact Core Editors is requested to review the proposed 
merge of lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi into 
lp:partner-contact-management.
=== added directory 'partner_birthdate'
=== added file 'partner_birthdate/__init__.py'
--- partner_birthdate/__init__.py	1970-01-01 00:00:00 +
+++ partner_birthdate/__init__.py	2014-05-22 13:00:53 +
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##
+#
+#Author: Nicolas Bessi
+#Copyright 2014 Camptocamp SA
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU Affero 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 Affero General Public License for more details.
+#
+#You should have received a copy of the GNU Affero General Public License
+#along with this program.  If not, see .
+#
+##
+from . import model

=== added file 'partner_birthdate/__openerp__.py'
--- partner_birthdate/__openerp__.py	1970-01-01 00:00:00 +
+++ partner_birthdate/__openerp__.py	2014-05-22 13:00:53 +
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+##
+#
+#Author: Nicolas Bessi
+#Copyright 2014 Camptocamp SA
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU Affero 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 Affero General Public License for more details.
+#
+#You should have received a copy of the GNU Affero General Public License
+#along with this program.  If not, see .
+#
+##
+{'name': 'Partner birthdate',
+ 'version': '0.1',
+ 'author': 'Camptocamp',
+ 'maintainer': 'Camptocamp',
+ 'category': 'Partner',
+ 'complexity': 'easy',
+ 'depends': ['base'],
+ 'description': """Add a new birthday field (of type date not char) on contact form""",
+ 'website': 'http://www.camptocamp.com',
+ 'data': ['view/res_partner_view.xml'],
+ 'demo': [],
+ 'test': [],
+ 'installable': True,
+ 'auto_install': False,
+ 'license': 'AGPL-3',
+ 'application': False,
+ }

=== added directory 'partner_birthdate/model'
=== added file 'partner_birthdate/model/__init__.py'
--- partner_birthdate/model/__init__.py	1970-01-01 00:00:00 +
+++ partner_birthdate/model/__init__.py	2014-05-22 13:00:53 +
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##
+#
+#Author: Nicolas Bessi
+#Copyright 2014 Camptocamp SA
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU Affero 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 Affero General Public License for more details.
+#
+#You should have received a copy of the GNU Affero General Public License
+#along with this program.  If not, see .
+#
+##
+from . import res_partner

=== added file 'partner_birthdate/model/res_partner.py'
--- partner_birthdate/model/res_partner.py	1970-01-01 00:00:00 +
+++ partner_birthdate/model/res_partner.py	2014-05-22 13:00:53 +
@@ -0,0 +1,

Re: [Openerp-community-reviewer] [Merge] lp:~therp-nl/partner-contact-management/7.0_1184983_compute_display_name into lp:partner-contact-management

2014-05-22 Thread Lara (Therp)
Review: Approve test


-- 
https://code.launchpad.net/~therp-nl/partner-contact-management/7.0_1184983_compute_display_name/+merge/220629
Your team Partner and Contact Core Editors is requested to review the proposed 
merge of 
lp:~therp-nl/partner-contact-management/7.0_1184983_compute_display_name into 
lp:partner-contact-management.

-- 
Mailing list: https://launchpad.net/~openerp-community-reviewer
Post to : openerp-community-reviewer@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community-reviewer
More help   : https://help.launchpad.net/ListHelp


[Openerp-community-reviewer] [Merge] lp:~therp-nl/partner-contact-management/7.0_1184983_compute_display_name into lp:partner-contact-management

2014-05-22 Thread Ronald Portier (Therp)
Ronald Portier (Therp) has proposed merging 
lp:~therp-nl/partner-contact-management/7.0_1184983_compute_display_name into 
lp:partner-contact-management.

Requested reviews:
  Partner and Contact Core Editors (partner-contact-core-editors)
Related bugs:
  Bug #1184983 in Partner and Contact Management: "partner_firstname - 
display_name is not updated when a partner is modified"
  https://bugs.launchpad.net/partner-contact-management/+bug/1184983

For more details, see:
https://code.launchpad.net/~therp-nl/partner-contact-management/7.0_1184983_compute_display_name/+merge/220629

Force update of display_name on res.partner - but only if column present - on 
all create and write actions.
-- 
https://code.launchpad.net/~therp-nl/partner-contact-management/7.0_1184983_compute_display_name/+merge/220629
Your team Partner and Contact Core Editors is requested to review the proposed 
merge of 
lp:~therp-nl/partner-contact-management/7.0_1184983_compute_display_name into 
lp:partner-contact-management.
=== modified file 'partner_firstname/partner.py'
--- partner_firstname/partner.py	2014-02-18 17:09:53 +
+++ partner_firstname/partner.py	2014-05-22 12:13:06 +
@@ -45,6 +45,28 @@
 res[rec['id']] = fullname
 return res
 
+def _force_display_name(self, cr, uid, ids, context=None):
+'''Column display_name might, or might not exist in res.partner,
+depending on modules installed. At present it is added by the
+account_report_company module. If it is present, we will call the
+_display_name_compute function and use its return value to update the
+database directly.'''
+if 'display_name' in self._columns:
+try:
+values = self._display_name_compute(
+cr, uid, ids, 'display_name', False, context=context)
+except AttributeError:
+# just in case method does not exist:
+context = dict(context or {}) 
+context.pop('show_address', None) 
+values =  dict(self.name_get(cr, uid, ids, context=context))
+for key, value in values.iteritems():
+statement = (
+"update res_partner set display_name='%s' where id=%d"
+% (value, key)
+)
+cr.execute(statement)
+
 def _write_name(self, cursor, uid, partner_id, field_name, field_value, arg, context=None):
 """
 Try to reverse the effect of _compute_name_custom:
@@ -83,6 +105,12 @@
 del(default['name'])
 return super(ResPartner, self).copy_data(cr, uid, _id, default, context=context)
 
+def write(self, cr, uid, ids, vals, context=None):
+result = super(ResPartner, self).write(
+cr, uid, ids, vals, context=context)
+self._force_display_name(cr, uid, ids, context=context)
+return result
+
 def create(self, cursor, uid, vals, context=None):
 """
 To support data backward compatibility we have to keep this overwrite even if we
@@ -95,7 +123,10 @@
 corr_vals['lastname'] = corr_vals['name']
 del(corr_vals['name'])
 to_use = corr_vals
-return super(ResPartner, self).create(cursor, uid, to_use, context=context)
+result = super(ResPartner, self).create(
+cursor, uid, to_use, context=context)
+self._force_display_name(cursor, uid, [result], context=context)
+return result
 
 _columns = {'name': fields.function(_compute_name_custom, string="Name",
 type="char", store=True,

-- 
Mailing list: https://launchpad.net/~openerp-community-reviewer
Post to : openerp-community-reviewer@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community-reviewer
More help   : https://help.launchpad.net/ListHelp


Re: [Openerp-community-reviewer] [Merge] lp:~therp-nl/ocb-web/7.0_lp1261332_better_report_name into lp:ocb-web

2014-05-22 Thread Lara (Therp)
Review: Approve test


-- 
https://code.launchpad.net/~therp-nl/ocb-web/7.0_lp1261332_better_report_name/+merge/219901
Your team OpenERP Community Backports is subscribed to branch lp:ocb-web.

-- 
Mailing list: https://launchpad.net/~openerp-community-reviewer
Post to : openerp-community-reviewer@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community-reviewer
More help   : https://help.launchpad.net/ListHelp