Merge lp:~joao-gama/partner-contact-management/6.1-partner_auto_salesman into lp:~partner-contact-core-editors/partner-contact-management/6.1

Proposed by Joao Alfredo Gama Batista
Status: Merged
Merged at revision: 5
Proposed branch: lp:~joao-gama/partner-contact-management/6.1-partner_auto_salesman
Merge into: lp:~partner-contact-core-editors/partner-contact-management/6.1
Diff against target: 101 lines (+86/-0)
3 files modified
partner_auto_salesman/__init__.py (+22/-0)
partner_auto_salesman/__openerp__.py (+35/-0)
partner_auto_salesman/res_partner.py (+29/-0)
To merge this branch: bzr merge lp:~joao-gama/partner-contact-management/6.1-partner_auto_salesman
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) Approve
Review via email: mp+152002@code.launchpad.net

Description of the change

This is a teeny-tiny module that sets the default value for the salesman field with the current user id.

To post a comment you must log in.
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

LGTM. No test.

review: Approve
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'partner_auto_salesman'
2=== added file 'partner_auto_salesman/__init__.py'
3--- partner_auto_salesman/__init__.py 1970-01-01 00:00:00 +0000
4+++ partner_auto_salesman/__init__.py 2013-03-06 16:26:20 +0000
5@@ -0,0 +1,22 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU Affero General Public License as
14+# published by the Free Software Foundation, either version 3 of the
15+# License, or (at your option) any later version.
16+#
17+# This program is distributed in the hope that it will be useful,
18+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+# GNU Affero General Public License for more details.
21+#
22+# You should have received a copy of the GNU Affero General Public License
23+# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+#
25+##############################################################################
26+
27+import res_partner
28
29=== added file 'partner_auto_salesman/__openerp__.py'
30--- partner_auto_salesman/__openerp__.py 1970-01-01 00:00:00 +0000
31+++ partner_auto_salesman/__openerp__.py 2013-03-06 16:26:20 +0000
32@@ -0,0 +1,35 @@
33+# -*- coding: utf-8 -*-
34+##############################################################################
35+#
36+# OpenERP, Open Source Management Solution
37+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
38+#
39+# This program is free software: you can redistribute it and/or modify
40+# it under the terms of the GNU Affero General Public License as
41+# published by the Free Software Foundation, either version 3 of the
42+# License, or (at your option) any later version.
43+#
44+# This program is distributed in the hope that it will be useful,
45+# but WITHOUT ANY WARRANTY; without even the implied warranty of
46+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47+# GNU Affero General Public License for more details.
48+#
49+# You should have received a copy of the GNU Affero General Public License
50+# along with this program. If not, see <http://www.gnu.org/licenses/>.
51+#
52+##############################################################################
53+
54+{
55+ 'name': 'Partner auto salesman',
56+ 'version': '1.0',
57+ 'category': 'Customer Relationship Management',
58+ 'complexity': "easy",
59+ 'description': """Fill the salesman field with the current user id""",
60+ 'author': 'Savoir-faire Linux',
61+ 'website': 'http://www.savoirfairelinux.com',
62+ 'license': 'AGPL-3',
63+ 'depends': ['base'],
64+ 'installable': True,
65+ 'auto_install': False,
66+}
67+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
68
69=== added file 'partner_auto_salesman/res_partner.py'
70--- partner_auto_salesman/res_partner.py 1970-01-01 00:00:00 +0000
71+++ partner_auto_salesman/res_partner.py 2013-03-06 16:26:20 +0000
72@@ -0,0 +1,29 @@
73+# -*- coding: utf-8 -*-
74+##############################################################################
75+#
76+# OpenERP, Open Source Management Solution
77+# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
78+#
79+# This program is free software: you can redistribute it and/or modify
80+# it under the terms of the GNU Affero General Public License as
81+# published by the Free Software Foundation, either version 3 of the
82+# License, or (at your option) any later version.
83+#
84+# This program is distributed in the hope that it will be useful,
85+# but WITHOUT ANY WARRANTY; without even the implied warranty of
86+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
87+# GNU Affero General Public License for more details.
88+#
89+# You should have received a copy of the GNU Affero General Public License
90+# along with this program. If not, see <http://www.gnu.org/licenses/>.
91+#
92+##############################################################################
93+
94+from openerp.osv import osv
95+
96+
97+class res_partner(osv.osv):
98+ _inherit = 'res.partner'
99+ _defaults = {'user_id': lambda self, cr, uid, context: uid}
100+
101+res_partner()

Subscribers

People subscribed via source and target branches

to status/vote changes: