Merge lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_modules into lp:~partner-contact-core-editors/partner-contact-management/7.0
- partner-contact-management-base_contact_add_modules
- Merge into 7.0
Status: | Needs review |
---|---|
Proposed branch: | lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_modules |
Merge into: | lp:~partner-contact-core-editors/partner-contact-management/7.0 |
Diff against target: |
2416 lines (+2295/-0) 23 files modified
base_contact_by_functions/__init__.py (+27/-0) base_contact_by_functions/__openerp__.py (+56/-0) base_contact_by_functions/functions.py (+41/-0) base_contact_by_functions/functions_view.xml (+38/-0) base_contact_by_functions/i18n/base_contact_by_functions.pot (+353/-0) base_contact_by_functions/i18n/fr.po (+353/-0) base_contact_by_functions/res_institutions.py (+49/-0) base_contact_by_functions/res_institutions_view.xml (+55/-0) base_contact_by_functions/res_partner.py (+102/-0) base_contact_by_functions/res_partner_view.xml (+526/-0) base_contact_by_functions/security/ir.model.access.csv (+5/-0) base_contact_by_functions/tests/__init__.py (+31/-0) base_contact_by_functions/tests/test_functions.py (+98/-0) base_contact_by_functions/tests/test_institutions.py (+99/-0) base_contact_by_functions/tests/test_partner_category.py (+105/-0) base_contact_by_functions_partner_firstname/__init__.py (+25/-0) base_contact_by_functions_partner_firstname/__openerp__.py (+53/-0) base_contact_by_functions_partner_firstname/i18n/base_contact_by_functions_partner_firstname.pot (+27/-0) base_contact_by_functions_partner_firstname/i18n/fr.po (+27/-0) base_contact_by_functions_partner_firstname/res_partner.py (+76/-0) base_contact_by_functions_partner_firstname/res_partner_view.xml (+71/-0) base_contact_by_functions_partner_firstname/tests/__init__.py (+27/-0) base_contact_by_functions_partner_firstname/tests/test_partner.py (+51/-0) |
To merge this branch: | bzr merge lp:~savoirfairelinux-openerp/partner-contact-management/partner-contact-management-base_contact_add_modules |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lorenzo Battistini (community) | Needs Resubmitting | ||
Stefan Rijnhart (Opener) | Needs Information | ||
Sandy Carter (http://www.savoirfairelinux.com) | Abstain | ||
Review via email: mp+217775@code.launchpad.net |
This proposal supersedes a proposal from 2014-01-30.
Commit message
Description of the change
- [ADD] added base_contact_
- [ADD] Added base_contact_
The base_contact_
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) : Posted in a previous version of this proposal | # |
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) : | # |
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote : | # |
This is for cases where one partner (Mike Fletcher President of Agrolait) can be part of another company (Mike Fletcher VP of AsusTEK) in a different function.
The module helps track these functions.
Lorenzo Battistini (elbati) wrote : | # |
This project is now hosted on https:/
Unmerged revisions
- 46. By Sandy Carter (http://www.savoirfairelinux.com)
-
Fix KeyError which sometimes arises when installing modules.
Assert that contact_id exists in vals
- 45. By Sandy Carter (http://www.savoirfairelinux.com)
-
Fix error when creating partner with contact info
- 44. By Sandy Carter (http://www.savoirfairelinux.com)
-
adapt module for community firstname module
- 43. By El Hadji Dem (http://www.savoirfairelinux.com)
-
[IMP] is_company field is True by default and replace Organism by Parent Organism in form view
- 42. By El Hadji Dem (http://www.savoirfairelinux.com)
-
[ADD] added base_contact_
by_functions_ partner_ firstname module: It allows to add firstname before name.Name is considered like the lastname and we have firstname and lastname on partner view and contact view. - 41. By El Hadji Dem (http://www.savoirfairelinux.com)
-
[ADD] added base_contact_
by_functions module: It allow to manage contacts by function
Preview Diff
1 | === added directory 'base_contact_by_functions' | |||
2 | === added file 'base_contact_by_functions/__init__.py' | |||
3 | --- base_contact_by_functions/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ base_contact_by_functions/__init__.py 2014-04-30 15:00:54 +0000 | |||
5 | @@ -0,0 +1,27 @@ | |||
6 | 1 | # -*- encoding: utf-8 -*- | ||
7 | 2 | ############################################################################## | ||
8 | 3 | # | ||
9 | 4 | # OpenERP, Open Source Management Solution | ||
10 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
11 | 6 | # (<http://www.savoirfairelinux.com>). | ||
12 | 7 | # | ||
13 | 8 | # This program is free software: you can redistribute it and/or modify | ||
14 | 9 | # it under the terms of the GNU Affero General Public License as | ||
15 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
16 | 11 | # License, or (at your option) any later version. | ||
17 | 12 | # | ||
18 | 13 | # This program is distributed in the hope that it will be useful, | ||
19 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | 16 | # GNU Affero General Public License for more details. | ||
22 | 17 | # | ||
23 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
24 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
25 | 20 | # | ||
26 | 21 | ############################################################################## | ||
27 | 22 | |||
28 | 23 | from . import res_partner | ||
29 | 24 | from . import functions | ||
30 | 25 | from . import res_institutions | ||
31 | 26 | |||
32 | 27 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
33 | 0 | 28 | ||
34 | === added file 'base_contact_by_functions/__openerp__.py' | |||
35 | --- base_contact_by_functions/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
36 | +++ base_contact_by_functions/__openerp__.py 2014-04-30 15:00:54 +0000 | |||
37 | @@ -0,0 +1,56 @@ | |||
38 | 1 | # -*- encoding: utf-8 -*- | ||
39 | 2 | ############################################################################## | ||
40 | 3 | # | ||
41 | 4 | # OpenERP, Open Source Management Solution | ||
42 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
43 | 6 | # (<http://www.savoirfairelinux.com>). | ||
44 | 7 | # | ||
45 | 8 | # This program is free software: you can redistribute it and/or modify | ||
46 | 9 | # it under the terms of the GNU Affero General Public License as | ||
47 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
48 | 11 | # License, or (at your option) any later version. | ||
49 | 12 | # | ||
50 | 13 | # This program is distributed in the hope that it will be useful, | ||
51 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
52 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
53 | 16 | # GNU Affero General Public License for more details. | ||
54 | 17 | # | ||
55 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
56 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
57 | 20 | # | ||
58 | 21 | ############################################################################## | ||
59 | 22 | |||
60 | 23 | { | ||
61 | 24 | 'name': 'Contacts by Functions', | ||
62 | 25 | 'version': '0.1', | ||
63 | 26 | 'author': 'Savoir-faire Linux', | ||
64 | 27 | 'maintainer': 'Savoir-faire Linux', | ||
65 | 28 | 'website': 'http://www.savoirfairelinux.com', | ||
66 | 29 | 'category': 'Customer Relationship Management', | ||
67 | 30 | 'description': """ | ||
68 | 31 | Contacts by Functions | ||
69 | 32 | ===================== | ||
70 | 33 | |||
71 | 34 | This module allows you to manage contacts by functions | ||
72 | 35 | |||
73 | 36 | Contributors | ||
74 | 37 | ------------ | ||
75 | 38 | * EL Hadji Dem (elhadji.dem@savoirfairelinux.com) | ||
76 | 39 | """, | ||
77 | 40 | 'depends': [ | ||
78 | 41 | 'base_contact', | ||
79 | 42 | ], | ||
80 | 43 | 'external_dependencies': {}, | ||
81 | 44 | 'data': [ | ||
82 | 45 | 'functions_view.xml', | ||
83 | 46 | 'res_institutions_view.xml', | ||
84 | 47 | 'res_partner_view.xml', | ||
85 | 48 | 'security/ir.model.access.csv', | ||
86 | 49 | ], | ||
87 | 50 | 'demo': [], | ||
88 | 51 | 'test': [], | ||
89 | 52 | 'installable': True, | ||
90 | 53 | 'active': False, | ||
91 | 54 | } | ||
92 | 55 | |||
93 | 56 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
94 | 0 | 57 | ||
95 | === added file 'base_contact_by_functions/functions.py' | |||
96 | --- base_contact_by_functions/functions.py 1970-01-01 00:00:00 +0000 | |||
97 | +++ base_contact_by_functions/functions.py 2014-04-30 15:00:54 +0000 | |||
98 | @@ -0,0 +1,41 @@ | |||
99 | 1 | # -*- encoding: utf-8 -*- | ||
100 | 2 | ############################################################################## | ||
101 | 3 | # | ||
102 | 4 | # OpenERP, Open Source Management Solution | ||
103 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
104 | 6 | # (<http://www.savoirfairelinux.com>). | ||
105 | 7 | # | ||
106 | 8 | # This program is free software: you can redistribute it and/or modify | ||
107 | 9 | # it under the terms of the GNU Affero General Public License as | ||
108 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
109 | 11 | # License, or (at your option) any later version. | ||
110 | 12 | # | ||
111 | 13 | # This program is distributed in the hope that it will be useful, | ||
112 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
113 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
114 | 16 | # GNU Affero General Public License for more details. | ||
115 | 17 | # | ||
116 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
117 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
118 | 20 | # | ||
119 | 21 | ############################################################################## | ||
120 | 22 | |||
121 | 23 | from openerp.osv import fields, orm | ||
122 | 24 | |||
123 | 25 | |||
124 | 26 | class functions(orm.Model): | ||
125 | 27 | _description = 'Functions' | ||
126 | 28 | _name = 'functions' | ||
127 | 29 | _columns = { | ||
128 | 30 | 'name': fields.char('Name', size=256, required=True, select=True, | ||
129 | 31 | help='Name of function.'), | ||
130 | 32 | 'acronym': fields.char('Acronym', size=50, help='Acronym of function.'), | ||
131 | 33 | 'partner_ids': fields.many2many('res.partner', | ||
132 | 34 | 'function_partner_rel', | ||
133 | 35 | 'function_id', | ||
134 | 36 | 'partner_id', | ||
135 | 37 | 'Functions'), | ||
136 | 38 | 'institution_id': fields.many2one("res.institution", 'institution'), | ||
137 | 39 | } | ||
138 | 40 | |||
139 | 41 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
140 | 0 | 42 | ||
141 | === added file 'base_contact_by_functions/functions_view.xml' | |||
142 | --- base_contact_by_functions/functions_view.xml 1970-01-01 00:00:00 +0000 | |||
143 | +++ base_contact_by_functions/functions_view.xml 2014-04-30 15:00:54 +0000 | |||
144 | @@ -0,0 +1,38 @@ | |||
145 | 1 | <?xml version="1.0" ?> | ||
146 | 2 | <openerp> | ||
147 | 3 | <data> | ||
148 | 4 | <!-- Tree Views functions--> | ||
149 | 5 | <record model="ir.ui.view" id="functions_tree_view"> | ||
150 | 6 | <field name="name">Functions Tree View</field> | ||
151 | 7 | <field name="model">functions</field> | ||
152 | 8 | <field name="type">tree</field> | ||
153 | 9 | <field name="arch" type="xml"> | ||
154 | 10 | <tree string="FunctionsTree" version="7.0"> | ||
155 | 11 | <field name="name"/> | ||
156 | 12 | <field name="acronym"/> | ||
157 | 13 | </tree> | ||
158 | 14 | </field> | ||
159 | 15 | </record> | ||
160 | 16 | <!-- Form Views functions--> | ||
161 | 17 | <record model="ir.ui.view" id="functions_form_view"> | ||
162 | 18 | <field name="name">Functions Form View</field> | ||
163 | 19 | <field name="model">functions</field> | ||
164 | 20 | <field name="type">form</field> | ||
165 | 21 | <field name="arch" type="xml"> | ||
166 | 22 | <form string="FunctionsForm" version="7.0" > | ||
167 | 23 | <group col="4"> | ||
168 | 24 | <field name="name"/> | ||
169 | 25 | <field name="acronym"/> | ||
170 | 26 | </group> | ||
171 | 27 | </form> | ||
172 | 28 | </field> | ||
173 | 29 | </record> | ||
174 | 30 | <!-- Actions --> | ||
175 | 31 | <record model="ir.actions.act_window" id="action_functions_tree_list"> | ||
176 | 32 | <field name="name">Functions</field> | ||
177 | 33 | <field name="view_id" ref="functions_tree_view"/> | ||
178 | 34 | <field name="res_model">functions</field> | ||
179 | 35 | <field name="view_mode">tree,form</field> | ||
180 | 36 | </record> | ||
181 | 37 | </data> | ||
182 | 38 | </openerp> | ||
183 | 0 | 39 | ||
184 | === added directory 'base_contact_by_functions/i18n' | |||
185 | === added file 'base_contact_by_functions/i18n/base_contact_by_functions.pot' | |||
186 | --- base_contact_by_functions/i18n/base_contact_by_functions.pot 1970-01-01 00:00:00 +0000 | |||
187 | +++ base_contact_by_functions/i18n/base_contact_by_functions.pot 2014-04-30 15:00:54 +0000 | |||
188 | @@ -0,0 +1,353 @@ | |||
189 | 1 | # Translation of OpenERP Server. | ||
190 | 2 | # This file contains the translation of the following modules: | ||
191 | 3 | # * base_contact_by_functions | ||
192 | 4 | # | ||
193 | 5 | msgid "" | ||
194 | 6 | msgstr "" | ||
195 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
196 | 8 | "Report-Msgid-Bugs-To: \n" | ||
197 | 9 | "POT-Creation-Date: 2014-01-28 22:15+0000\n" | ||
198 | 10 | "PO-Revision-Date: 2014-01-28 17:15-0500\n" | ||
199 | 11 | "Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n" | ||
200 | 12 | "Language-Team: \n" | ||
201 | 13 | "MIME-Version: 1.0\n" | ||
202 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
203 | 15 | "Content-Transfer-Encoding: 8bit\n" | ||
204 | 16 | "Plural-Forms: \n" | ||
205 | 17 | "X-Generator: Poedit 1.5.4\n" | ||
206 | 18 | |||
207 | 19 | #. module: base_contact_by_functions | ||
208 | 20 | #: field:res.category.functions,category_id:0 | ||
209 | 21 | msgid "Category" | ||
210 | 22 | msgstr "" | ||
211 | 23 | |||
212 | 24 | #. module: base_contact_by_functions | ||
213 | 25 | #: view:res.partner:0 | ||
214 | 26 | msgid "City" | ||
215 | 27 | msgstr "" | ||
216 | 28 | |||
217 | 29 | #. module: base_contact_by_functions | ||
218 | 30 | #: field:functions,partner_ids:0 | ||
219 | 31 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_functions_tree_list | ||
220 | 32 | #: model:ir.model,name:base_contact_by_functions.model_functions | ||
221 | 33 | #: field:res.category.functions,functions_id:0 view:res.institution:0 | ||
222 | 34 | #: field:res.institution,institutionfunction_ids:0 | ||
223 | 35 | #: field:res.institution.functions,functions_id:0 view:res.partner:0 | ||
224 | 36 | #: field:res.partner,functions_ids:0 view:res.partner.category:0 | ||
225 | 37 | #: field:res.partner.category,categoryfunction_ids:0 | ||
226 | 38 | msgid "Functions" | ||
227 | 39 | msgstr "" | ||
228 | 40 | |||
229 | 41 | #. module: base_contact_by_functions | ||
230 | 42 | #: view:res.partner:0 | ||
231 | 43 | msgid "History (Functions)" | ||
232 | 44 | msgstr "" | ||
233 | 45 | |||
234 | 46 | #. module: base_contact_by_functions | ||
235 | 47 | #: model:ir.model,name:base_contact_by_functions.model_res_institution_functions | ||
236 | 48 | msgid "Institutions functions" | ||
237 | 49 | msgstr "" | ||
238 | 50 | |||
239 | 51 | #. module: base_contact_by_functions | ||
240 | 52 | #: help:res.partner,delivered_country:0 | ||
241 | 53 | msgid "Country for which a passport is delivered" | ||
242 | 54 | msgstr "" | ||
243 | 55 | |||
244 | 56 | #. module: base_contact_by_functions | ||
245 | 57 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_contact_form | ||
246 | 58 | msgid "Contacts" | ||
247 | 59 | msgstr "" | ||
248 | 60 | |||
249 | 61 | #. module: base_contact_by_functions | ||
250 | 62 | #: view:res.partner:0 | ||
251 | 63 | msgid "Street..." | ||
252 | 64 | msgstr "" | ||
253 | 65 | |||
254 | 66 | #. module: base_contact_by_functions | ||
255 | 67 | #: view:res.institution:0 | ||
256 | 68 | msgid "Add functions for this institution" | ||
257 | 69 | msgstr "" | ||
258 | 70 | |||
259 | 71 | #. module: base_contact_by_functions | ||
260 | 72 | #: view:functions:0 view:res.institution:0 view:res.partner.category:0 | ||
261 | 73 | msgid "FunctionsTree" | ||
262 | 74 | msgstr "" | ||
263 | 75 | |||
264 | 76 | #. module: base_contact_by_functions | ||
265 | 77 | #: sql_constraint:res.institution:0 | ||
266 | 78 | msgid "Name already exists" | ||
267 | 79 | msgstr "" | ||
268 | 80 | |||
269 | 81 | #. module: base_contact_by_functions | ||
270 | 82 | #: view:res.partner:0 | ||
271 | 83 | msgid "State" | ||
272 | 84 | msgstr "" | ||
273 | 85 | |||
274 | 86 | #. module: base_contact_by_functions | ||
275 | 87 | #: help:res.category.functions,sequence:0 | ||
276 | 88 | #: help:res.institution.functions,sequence:0 | ||
277 | 89 | msgid "Used to order" | ||
278 | 90 | msgstr "" | ||
279 | 91 | |||
280 | 92 | #. module: base_contact_by_functions | ||
281 | 93 | #: view:functions:0 view:res.institution:0 view:res.partner.category:0 | ||
282 | 94 | msgid "FunctionsForm" | ||
283 | 95 | msgstr "" | ||
284 | 96 | |||
285 | 97 | #. module: base_contact_by_functions | ||
286 | 98 | #: view:res.partner:0 | ||
287 | 99 | msgid "e.g. Sales Director" | ||
288 | 100 | msgstr "" | ||
289 | 101 | |||
290 | 102 | #. module: base_contact_by_functions | ||
291 | 103 | #: help:functions,acronym:0 | ||
292 | 104 | msgid "Acronym of function." | ||
293 | 105 | msgstr "" | ||
294 | 106 | |||
295 | 107 | #. module: base_contact_by_functions | ||
296 | 108 | #: view:res.partner:0 | ||
297 | 109 | msgid "Tags..." | ||
298 | 110 | msgstr "" | ||
299 | 111 | |||
300 | 112 | #. module: base_contact_by_functions | ||
301 | 113 | #: field:res.partner,start_date:0 | ||
302 | 114 | msgid "Start date" | ||
303 | 115 | msgstr "" | ||
304 | 116 | |||
305 | 117 | #. module: base_contact_by_functions | ||
306 | 118 | #: view:res.institution:0 | ||
307 | 119 | msgid "InstitutionsForm" | ||
308 | 120 | msgstr "" | ||
309 | 121 | |||
310 | 122 | #. module: base_contact_by_functions | ||
311 | 123 | #: view:res.partner:0 | ||
312 | 124 | msgid "Fax:" | ||
313 | 125 | msgstr "" | ||
314 | 126 | |||
315 | 127 | #. module: base_contact_by_functions | ||
316 | 128 | #: field:res.partner,expiration_date:0 | ||
317 | 129 | msgid "Expiration date" | ||
318 | 130 | msgstr "" | ||
319 | 131 | |||
320 | 132 | #. module: base_contact_by_functions | ||
321 | 133 | #: view:res.partner:0 | ||
322 | 134 | msgid "Function" | ||
323 | 135 | msgstr "" | ||
324 | 136 | |||
325 | 137 | #. module: base_contact_by_functions | ||
326 | 138 | #: view:res.partner:0 | ||
327 | 139 | msgid "Parent Organism" | ||
328 | 140 | msgstr "" | ||
329 | 141 | |||
330 | 142 | #. module: base_contact_by_functions | ||
331 | 143 | #: view:res.partner:0 | ||
332 | 144 | msgid "Zip" | ||
333 | 145 | msgstr "" | ||
334 | 146 | |||
335 | 147 | #. module: base_contact_by_functions | ||
336 | 148 | #: field:res.partner,delivered_country:0 | ||
337 | 149 | msgid "Country Passport" | ||
338 | 150 | msgstr "" | ||
339 | 151 | |||
340 | 152 | #. module: base_contact_by_functions | ||
341 | 153 | #: field:res.partner,other_contact_history_ids:0 | ||
342 | 154 | msgid "unknown" | ||
343 | 155 | msgstr "" | ||
344 | 156 | |||
345 | 157 | #. module: base_contact_by_functions | ||
346 | 158 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_customer_form | ||
347 | 159 | msgid "Company" | ||
348 | 160 | msgstr "" | ||
349 | 161 | |||
350 | 162 | #. module: base_contact_by_functions | ||
351 | 163 | #: model:ir.model,name:base_contact_by_functions.model_res_category_functions | ||
352 | 164 | msgid "Categories functions" | ||
353 | 165 | msgstr "" | ||
354 | 166 | |||
355 | 167 | #. module: base_contact_by_functions | ||
356 | 168 | #: help:res.institution,name:0 | ||
357 | 169 | msgid "Name of institution." | ||
358 | 170 | msgstr "" | ||
359 | 171 | |||
360 | 172 | #. module: base_contact_by_functions | ||
361 | 173 | #: help:res.partner,naming:0 | ||
362 | 174 | msgid "Naming." | ||
363 | 175 | msgstr "" | ||
364 | 176 | |||
365 | 177 | #. module: base_contact_by_functions | ||
366 | 178 | #: view:res.partner:0 | ||
367 | 179 | msgid "Tag" | ||
368 | 180 | msgstr "" | ||
369 | 181 | |||
370 | 182 | #. module: base_contact_by_functions | ||
371 | 183 | #: view:res.partner:0 | ||
372 | 184 | msgid "Passport information" | ||
373 | 185 | msgstr "" | ||
374 | 186 | |||
375 | 187 | #. module: base_contact_by_functions | ||
376 | 188 | #: view:res.partner:0 | ||
377 | 189 | msgid "Address" | ||
378 | 190 | msgstr "" | ||
379 | 191 | |||
380 | 192 | #. module: base_contact_by_functions | ||
381 | 193 | #: view:res.partner:0 | ||
382 | 194 | msgid "Parent organism" | ||
383 | 195 | msgstr "" | ||
384 | 196 | |||
385 | 197 | #. module: base_contact_by_functions | ||
386 | 198 | #: view:res.partner:0 | ||
387 | 199 | msgid "have the same form for contact and other postions" | ||
388 | 200 | msgstr "" | ||
389 | 201 | |||
390 | 202 | #. module: base_contact_by_functions | ||
391 | 203 | #: view:res.partner:0 | ||
392 | 204 | msgid "Select functions for this organism" | ||
393 | 205 | msgstr "" | ||
394 | 206 | |||
395 | 207 | #. module: base_contact_by_functions | ||
396 | 208 | #: view:res.partner:0 | ||
397 | 209 | msgid "Phone:" | ||
398 | 210 | msgstr "" | ||
399 | 211 | |||
400 | 212 | #. module: base_contact_by_functions | ||
401 | 213 | #: field:functions,name:0 field:res.institution,name:0 | ||
402 | 214 | msgid "Name" | ||
403 | 215 | msgstr "" | ||
404 | 216 | |||
405 | 217 | #. module: base_contact_by_functions | ||
406 | 218 | #: view:res.partner:0 | ||
407 | 219 | msgid "ZIP" | ||
408 | 220 | msgstr "" | ||
409 | 221 | |||
410 | 222 | #. module: base_contact_by_functions | ||
411 | 223 | #: view:res.partner:0 | ||
412 | 224 | msgid "Use organism address" | ||
413 | 225 | msgstr "" | ||
414 | 226 | |||
415 | 227 | #. module: base_contact_by_functions | ||
416 | 228 | #: view:res.partner:0 | ||
417 | 229 | msgid "Country" | ||
418 | 230 | msgstr "" | ||
419 | 231 | |||
420 | 232 | #. module: base_contact_by_functions | ||
421 | 233 | #: field:functions,institution_id:0 | ||
422 | 234 | msgid "institution" | ||
423 | 235 | msgstr "" | ||
424 | 236 | |||
425 | 237 | #. module: base_contact_by_functions | ||
426 | 238 | #: view:res.partner:0 | ||
427 | 239 | msgid "Is an Organism" | ||
428 | 240 | msgstr "" | ||
429 | 241 | |||
430 | 242 | #. module: base_contact_by_functions | ||
431 | 243 | #: field:res.partner,function_id:0 | ||
432 | 244 | msgid "Position Occupied" | ||
433 | 245 | msgstr "" | ||
434 | 246 | |||
435 | 247 | #. module: base_contact_by_functions | ||
436 | 248 | #: view:res.partner:0 | ||
437 | 249 | msgid "Contact" | ||
438 | 250 | msgstr "" | ||
439 | 251 | |||
440 | 252 | #. module: base_contact_by_functions | ||
441 | 253 | #: help:res.institution,sequence:0 | ||
442 | 254 | msgid "Used to order the institutions" | ||
443 | 255 | msgstr "" | ||
444 | 256 | |||
445 | 257 | #. module: base_contact_by_functions | ||
446 | 258 | #: view:res.partner:0 | ||
447 | 259 | msgid "Mobile:" | ||
448 | 260 | msgstr "" | ||
449 | 261 | |||
450 | 262 | #. module: base_contact_by_functions | ||
451 | 263 | #: model:ir.model,name:base_contact_by_functions.model_res_partner_category | ||
452 | 264 | msgid "Partner Categories" | ||
453 | 265 | msgstr "" | ||
454 | 266 | |||
455 | 267 | #. module: base_contact_by_functions | ||
456 | 268 | #: view:res.partner:0 | ||
457 | 269 | msgid "Organism" | ||
458 | 270 | msgstr "" | ||
459 | 271 | |||
460 | 272 | #. module: base_contact_by_functions | ||
461 | 273 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_institutions_tree_list | ||
462 | 274 | #: model:ir.model,name:base_contact_by_functions.model_res_institution | ||
463 | 275 | #: field:res.institution.functions,institution_id:0 | ||
464 | 276 | msgid "Institutions" | ||
465 | 277 | msgstr "" | ||
466 | 278 | |||
467 | 279 | #. module: base_contact_by_functions | ||
468 | 280 | #: view:res.partner:0 | ||
469 | 281 | msgid "History" | ||
470 | 282 | msgstr "" | ||
471 | 283 | |||
472 | 284 | #. module: base_contact_by_functions | ||
473 | 285 | #: field:res.partner,end_date:0 | ||
474 | 286 | msgid "End date" | ||
475 | 287 | msgstr "" | ||
476 | 288 | |||
477 | 289 | #. module: base_contact_by_functions | ||
478 | 290 | #: view:res.partner.category:0 | ||
479 | 291 | msgid "Add function" | ||
480 | 292 | msgstr "" | ||
481 | 293 | |||
482 | 294 | #. module: base_contact_by_functions | ||
483 | 295 | #: view:res.partner:0 | ||
484 | 296 | msgid "Bank Details" | ||
485 | 297 | msgstr "" | ||
486 | 298 | |||
487 | 299 | #. module: base_contact_by_functions | ||
488 | 300 | #: view:res.institution:0 | ||
489 | 301 | msgid "InstitutionsTree" | ||
490 | 302 | msgstr "" | ||
491 | 303 | |||
492 | 304 | #. module: base_contact_by_functions | ||
493 | 305 | #: field:res.category.functions,sequence:0 field:res.institution,sequence:0 | ||
494 | 306 | #: field:res.institution.functions,sequence:0 | ||
495 | 307 | msgid "Sequence" | ||
496 | 308 | msgstr "" | ||
497 | 309 | |||
498 | 310 | #. module: base_contact_by_functions | ||
499 | 311 | #: view:res.partner:0 | ||
500 | 312 | msgid "Bank Accounts" | ||
501 | 313 | msgstr "" | ||
502 | 314 | |||
503 | 315 | #. module: base_contact_by_functions | ||
504 | 316 | #: view:res.partner:0 | ||
505 | 317 | msgid "No, Street, Apartment/Office" | ||
506 | 318 | msgstr "" | ||
507 | 319 | |||
508 | 320 | #. module: base_contact_by_functions | ||
509 | 321 | #: view:res.partner:0 | ||
510 | 322 | msgid "Use address organism" | ||
511 | 323 | msgstr "" | ||
512 | 324 | |||
513 | 325 | #. module: base_contact_by_functions | ||
514 | 326 | #: field:functions,acronym:0 | ||
515 | 327 | msgid "Acronym" | ||
516 | 328 | msgstr "" | ||
517 | 329 | |||
518 | 330 | #. module: base_contact_by_functions | ||
519 | 331 | #: help:functions,name:0 | ||
520 | 332 | msgid "Name of function." | ||
521 | 333 | msgstr "" | ||
522 | 334 | |||
523 | 335 | #. module: base_contact_by_functions | ||
524 | 336 | #: help:res.partner,passport_number:0 | ||
525 | 337 | msgid "Passport number." | ||
526 | 338 | msgstr "" | ||
527 | 339 | |||
528 | 340 | #. module: base_contact_by_functions | ||
529 | 341 | #: field:res.partner,passport_number:0 | ||
530 | 342 | msgid "Passport Number" | ||
531 | 343 | msgstr "" | ||
532 | 344 | |||
533 | 345 | #. module: base_contact_by_functions | ||
534 | 346 | #: model:ir.model,name:base_contact_by_functions.model_res_partner | ||
535 | 347 | msgid "Partner" | ||
536 | 348 | msgstr "" | ||
537 | 349 | |||
538 | 350 | #. module: base_contact_by_functions | ||
539 | 351 | #: field:res.partner,naming:0 | ||
540 | 352 | msgid "Naming" | ||
541 | 353 | msgstr "" | ||
542 | 0 | 354 | ||
543 | === added file 'base_contact_by_functions/i18n/fr.po' | |||
544 | --- base_contact_by_functions/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
545 | +++ base_contact_by_functions/i18n/fr.po 2014-04-30 15:00:54 +0000 | |||
546 | @@ -0,0 +1,353 @@ | |||
547 | 1 | # Translation of OpenERP Server. | ||
548 | 2 | # This file contains the translation of the following modules: | ||
549 | 3 | # * base_contact_by_functions | ||
550 | 4 | # | ||
551 | 5 | msgid "" | ||
552 | 6 | msgstr "" | ||
553 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
554 | 8 | "Report-Msgid-Bugs-To: \n" | ||
555 | 9 | "POT-Creation-Date: 2014-01-29 15:16+0000\n" | ||
556 | 10 | "PO-Revision-Date: 2014-01-29 10:19-0500\n" | ||
557 | 11 | "Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n" | ||
558 | 12 | "Language-Team: \n" | ||
559 | 13 | "MIME-Version: 1.0\n" | ||
560 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
561 | 15 | "Content-Transfer-Encoding: 8bit\n" | ||
562 | 16 | "Plural-Forms: \n" | ||
563 | 17 | "X-Generator: Poedit 1.5.4\n" | ||
564 | 18 | |||
565 | 19 | #. module: base_contact_by_functions | ||
566 | 20 | #: field:res.category.functions,category_id:0 | ||
567 | 21 | msgid "Category" | ||
568 | 22 | msgstr "Catégorie" | ||
569 | 23 | |||
570 | 24 | #. module: base_contact_by_functions | ||
571 | 25 | #: view:res.partner:0 | ||
572 | 26 | msgid "City" | ||
573 | 27 | msgstr "Ville" | ||
574 | 28 | |||
575 | 29 | #. module: base_contact_by_functions | ||
576 | 30 | #: field:functions,partner_ids:0 | ||
577 | 31 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_functions_tree_list | ||
578 | 32 | #: model:ir.model,name:base_contact_by_functions.model_functions | ||
579 | 33 | #: field:res.category.functions,functions_id:0 view:res.institution:0 | ||
580 | 34 | #: field:res.institution,institutionfunction_ids:0 | ||
581 | 35 | #: field:res.institution.functions,functions_id:0 view:res.partner:0 | ||
582 | 36 | #: field:res.partner,functions_ids:0 view:res.partner.category:0 | ||
583 | 37 | #: field:res.partner.category,categoryfunction_ids:0 | ||
584 | 38 | msgid "Functions" | ||
585 | 39 | msgstr "Fonctions" | ||
586 | 40 | |||
587 | 41 | #. module: base_contact_by_functions | ||
588 | 42 | #: view:res.partner:0 | ||
589 | 43 | msgid "History (Functions)" | ||
590 | 44 | msgstr "Historique (Fonctions)" | ||
591 | 45 | |||
592 | 46 | #. module: base_contact_by_functions | ||
593 | 47 | #: model:ir.model,name:base_contact_by_functions.model_res_institution_functions | ||
594 | 48 | msgid "Institutions functions" | ||
595 | 49 | msgstr "Fonctions des institutions" | ||
596 | 50 | |||
597 | 51 | #. module: base_contact_by_functions | ||
598 | 52 | #: help:res.partner,delivered_country:0 | ||
599 | 53 | msgid "Country for which a passport is delivered" | ||
600 | 54 | msgstr "Pays pour lequel le passeport est délivré" | ||
601 | 55 | |||
602 | 56 | #. module: base_contact_by_functions | ||
603 | 57 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_contact_form | ||
604 | 58 | msgid "Contacts" | ||
605 | 59 | msgstr "Contacts" | ||
606 | 60 | |||
607 | 61 | #. module: base_contact_by_functions | ||
608 | 62 | #: view:res.partner:0 | ||
609 | 63 | msgid "Street..." | ||
610 | 64 | msgstr "Rue..." | ||
611 | 65 | |||
612 | 66 | #. module: base_contact_by_functions | ||
613 | 67 | #: view:res.institution:0 | ||
614 | 68 | msgid "Add functions for this institution" | ||
615 | 69 | msgstr "Ajouter des fonctions de cette institution" | ||
616 | 70 | |||
617 | 71 | #. module: base_contact_by_functions | ||
618 | 72 | #: view:functions:0 view:res.institution:0 view:res.partner.category:0 | ||
619 | 73 | msgid "FunctionsTree" | ||
620 | 74 | msgstr "FonctionsTree" | ||
621 | 75 | |||
622 | 76 | #. module: base_contact_by_functions | ||
623 | 77 | #: sql_constraint:res.institution:0 | ||
624 | 78 | msgid "Name already exists" | ||
625 | 79 | msgstr "Le nom existe déjà" | ||
626 | 80 | |||
627 | 81 | #. module: base_contact_by_functions | ||
628 | 82 | #: view:res.partner:0 | ||
629 | 83 | msgid "State" | ||
630 | 84 | msgstr "Etat" | ||
631 | 85 | |||
632 | 86 | #. module: base_contact_by_functions | ||
633 | 87 | #: help:res.category.functions,sequence:0 | ||
634 | 88 | #: help:res.institution.functions,sequence:0 | ||
635 | 89 | msgid "Used to order" | ||
636 | 90 | msgstr "Permet d'ordonner" | ||
637 | 91 | |||
638 | 92 | #. module: base_contact_by_functions | ||
639 | 93 | #: view:functions:0 view:res.institution:0 view:res.partner.category:0 | ||
640 | 94 | msgid "FunctionsForm" | ||
641 | 95 | msgstr "FonctionsForm" | ||
642 | 96 | |||
643 | 97 | #. module: base_contact_by_functions | ||
644 | 98 | #: view:res.partner:0 | ||
645 | 99 | msgid "e.g. Sales Director" | ||
646 | 100 | msgstr "ex: Directeur de vente" | ||
647 | 101 | |||
648 | 102 | #. module: base_contact_by_functions | ||
649 | 103 | #: help:functions,acronym:0 | ||
650 | 104 | msgid "Acronym of function." | ||
651 | 105 | msgstr "Acronyme de la fonction." | ||
652 | 106 | |||
653 | 107 | #. module: base_contact_by_functions | ||
654 | 108 | #: view:res.partner:0 | ||
655 | 109 | msgid "Tags..." | ||
656 | 110 | msgstr "Etiquettes..." | ||
657 | 111 | |||
658 | 112 | #. module: base_contact_by_functions | ||
659 | 113 | #: field:res.partner,start_date:0 | ||
660 | 114 | msgid "Start date" | ||
661 | 115 | msgstr "Date de début" | ||
662 | 116 | |||
663 | 117 | #. module: base_contact_by_functions | ||
664 | 118 | #: view:res.institution:0 | ||
665 | 119 | msgid "InstitutionsForm" | ||
666 | 120 | msgstr "InstitutionsForm" | ||
667 | 121 | |||
668 | 122 | #. module: base_contact_by_functions | ||
669 | 123 | #: view:res.partner:0 | ||
670 | 124 | msgid "Fax:" | ||
671 | 125 | msgstr "Télécopie :" | ||
672 | 126 | |||
673 | 127 | #. module: base_contact_by_functions | ||
674 | 128 | #: field:res.partner,expiration_date:0 | ||
675 | 129 | msgid "Expiration date" | ||
676 | 130 | msgstr "Date d'expiration" | ||
677 | 131 | |||
678 | 132 | #. module: base_contact_by_functions | ||
679 | 133 | #: view:res.partner:0 | ||
680 | 134 | msgid "Function" | ||
681 | 135 | msgstr "Fonction" | ||
682 | 136 | |||
683 | 137 | #. module: base_contact_by_functions | ||
684 | 138 | #: view:res.partner:0 | ||
685 | 139 | msgid "Fax" | ||
686 | 140 | msgstr "Télécopie" | ||
687 | 141 | |||
688 | 142 | #. module: base_contact_by_functions | ||
689 | 143 | #: view:res.partner:0 | ||
690 | 144 | msgid "Parent Organism" | ||
691 | 145 | msgstr "Organisme parent" | ||
692 | 146 | |||
693 | 147 | #. module: base_contact_by_functions | ||
694 | 148 | #: field:res.partner,delivered_country:0 | ||
695 | 149 | msgid "Country Passport" | ||
696 | 150 | msgstr "Pays de délivrance du passeport" | ||
697 | 151 | |||
698 | 152 | #. module: base_contact_by_functions | ||
699 | 153 | #: field:res.partner,other_contact_history_ids:0 | ||
700 | 154 | msgid "unknown" | ||
701 | 155 | msgstr "inconnu" | ||
702 | 156 | |||
703 | 157 | #. module: base_contact_by_functions | ||
704 | 158 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_partner_customer_form | ||
705 | 159 | msgid "Company" | ||
706 | 160 | msgstr "Organisme" | ||
707 | 161 | |||
708 | 162 | #. module: base_contact_by_functions | ||
709 | 163 | #: model:ir.model,name:base_contact_by_functions.model_res_category_functions | ||
710 | 164 | msgid "Categories functions" | ||
711 | 165 | msgstr "Catégories functions" | ||
712 | 166 | |||
713 | 167 | #. module: base_contact_by_functions | ||
714 | 168 | #: help:res.institution,name:0 | ||
715 | 169 | msgid "Name of institution." | ||
716 | 170 | msgstr "Nom de l'institution." | ||
717 | 171 | |||
718 | 172 | #. module: base_contact_by_functions | ||
719 | 173 | #: help:res.partner,naming:0 | ||
720 | 174 | msgid "Naming." | ||
721 | 175 | msgstr "Appellation" | ||
722 | 176 | |||
723 | 177 | #. module: base_contact_by_functions | ||
724 | 178 | #: view:res.partner:0 | ||
725 | 179 | msgid "Tag" | ||
726 | 180 | msgstr "Etiquette" | ||
727 | 181 | |||
728 | 182 | #. module: base_contact_by_functions | ||
729 | 183 | #: view:res.partner:0 | ||
730 | 184 | msgid "Passport information" | ||
731 | 185 | msgstr "Informations du passeport" | ||
732 | 186 | |||
733 | 187 | #. module: base_contact_by_functions | ||
734 | 188 | #: view:res.partner:0 | ||
735 | 189 | msgid "Address" | ||
736 | 190 | msgstr "Adresse" | ||
737 | 191 | |||
738 | 192 | #. module: base_contact_by_functions | ||
739 | 193 | #: view:res.partner:0 | ||
740 | 194 | msgid "Parent organism" | ||
741 | 195 | msgstr "Organisme parent" | ||
742 | 196 | |||
743 | 197 | #. module: base_contact_by_functions | ||
744 | 198 | #: view:res.partner:0 | ||
745 | 199 | msgid "have the same form for contact and other postions" | ||
746 | 200 | msgstr "Avoir le même formulaire de contact et d'autres postions" | ||
747 | 201 | |||
748 | 202 | #. module: base_contact_by_functions | ||
749 | 203 | #: view:res.partner:0 | ||
750 | 204 | msgid "Select functions for this organism" | ||
751 | 205 | msgstr "Sélectionner les fonctions de cet organisme" | ||
752 | 206 | |||
753 | 207 | #. module: base_contact_by_functions | ||
754 | 208 | #: view:res.partner:0 | ||
755 | 209 | msgid "Phone:" | ||
756 | 210 | msgstr "Téléphone:" | ||
757 | 211 | |||
758 | 212 | #. module: base_contact_by_functions | ||
759 | 213 | #: field:functions,name:0 field:res.institution,name:0 | ||
760 | 214 | msgid "Name" | ||
761 | 215 | msgstr "Nom" | ||
762 | 216 | |||
763 | 217 | #. module: base_contact_by_functions | ||
764 | 218 | #: view:res.partner:0 | ||
765 | 219 | msgid "ZIP" | ||
766 | 220 | msgstr "Code postal" | ||
767 | 221 | |||
768 | 222 | #. module: base_contact_by_functions | ||
769 | 223 | #: view:res.partner:0 | ||
770 | 224 | msgid "Use organism address" | ||
771 | 225 | msgstr "Utilisez l'adresse de l'organisme" | ||
772 | 226 | |||
773 | 227 | #. module: base_contact_by_functions | ||
774 | 228 | #: view:res.partner:0 | ||
775 | 229 | msgid "Country" | ||
776 | 230 | msgstr "Pays" | ||
777 | 231 | |||
778 | 232 | #. module: base_contact_by_functions | ||
779 | 233 | #: field:functions,institution_id:0 | ||
780 | 234 | msgid "institution" | ||
781 | 235 | msgstr "institution" | ||
782 | 236 | |||
783 | 237 | #. module: base_contact_by_functions | ||
784 | 238 | #: view:res.partner:0 | ||
785 | 239 | msgid "Is an Organism" | ||
786 | 240 | msgstr "Est un Organisme" | ||
787 | 241 | |||
788 | 242 | #. module: base_contact_by_functions | ||
789 | 243 | #: field:res.partner,function_id:0 | ||
790 | 244 | msgid "Position Occupied" | ||
791 | 245 | msgstr "Fonction Occupée" | ||
792 | 246 | |||
793 | 247 | #. module: base_contact_by_functions | ||
794 | 248 | #: view:res.partner:0 | ||
795 | 249 | msgid "Contact" | ||
796 | 250 | msgstr "Contact" | ||
797 | 251 | |||
798 | 252 | #. module: base_contact_by_functions | ||
799 | 253 | #: help:res.institution,sequence:0 | ||
800 | 254 | msgid "Used to order the institutions" | ||
801 | 255 | msgstr "Permet d'ordonner les institutions" | ||
802 | 256 | |||
803 | 257 | #. module: base_contact_by_functions | ||
804 | 258 | #: view:res.partner:0 | ||
805 | 259 | msgid "Mobile:" | ||
806 | 260 | msgstr "Portable :" | ||
807 | 261 | |||
808 | 262 | #. module: base_contact_by_functions | ||
809 | 263 | #: model:ir.model,name:base_contact_by_functions.model_res_partner_category | ||
810 | 264 | msgid "Partner Categories" | ||
811 | 265 | msgstr "Catégories de partenaires" | ||
812 | 266 | |||
813 | 267 | #. module: base_contact_by_functions | ||
814 | 268 | #: view:res.partner:0 | ||
815 | 269 | msgid "Organism" | ||
816 | 270 | msgstr "Organisme" | ||
817 | 271 | |||
818 | 272 | #. module: base_contact_by_functions | ||
819 | 273 | #: model:ir.actions.act_window,name:base_contact_by_functions.action_institutions_tree_list | ||
820 | 274 | #: model:ir.model,name:base_contact_by_functions.model_res_institution | ||
821 | 275 | #: field:res.institution.functions,institution_id:0 | ||
822 | 276 | msgid "Institutions" | ||
823 | 277 | msgstr "Institutions" | ||
824 | 278 | |||
825 | 279 | #. module: base_contact_by_functions | ||
826 | 280 | #: view:res.partner:0 | ||
827 | 281 | msgid "History" | ||
828 | 282 | msgstr "Historique" | ||
829 | 283 | |||
830 | 284 | #. module: base_contact_by_functions | ||
831 | 285 | #: field:res.partner,end_date:0 | ||
832 | 286 | msgid "End date" | ||
833 | 287 | msgstr "Date de fin" | ||
834 | 288 | |||
835 | 289 | #. module: base_contact_by_functions | ||
836 | 290 | #: view:res.partner.category:0 | ||
837 | 291 | msgid "Add function" | ||
838 | 292 | msgstr "Ajouter fonction" | ||
839 | 293 | |||
840 | 294 | #. module: base_contact_by_functions | ||
841 | 295 | #: view:res.partner:0 | ||
842 | 296 | msgid "Bank Details" | ||
843 | 297 | msgstr "Coordonnées bancaires" | ||
844 | 298 | |||
845 | 299 | #. module: base_contact_by_functions | ||
846 | 300 | #: view:res.institution:0 | ||
847 | 301 | msgid "InstitutionsTree" | ||
848 | 302 | msgstr "InstitutionsTree" | ||
849 | 303 | |||
850 | 304 | #. module: base_contact_by_functions | ||
851 | 305 | #: field:res.category.functions,sequence:0 field:res.institution,sequence:0 | ||
852 | 306 | #: field:res.institution.functions,sequence:0 | ||
853 | 307 | msgid "Sequence" | ||
854 | 308 | msgstr "Séquence" | ||
855 | 309 | |||
856 | 310 | #. module: base_contact_by_functions | ||
857 | 311 | #: view:res.partner:0 | ||
858 | 312 | msgid "Bank Accounts" | ||
859 | 313 | msgstr "Comptes bancaires" | ||
860 | 314 | |||
861 | 315 | #. module: base_contact_by_functions | ||
862 | 316 | #: view:res.partner:0 | ||
863 | 317 | msgid "No, Street, Apartment/Office" | ||
864 | 318 | msgstr "No, Rue, Appartement/Bureau" | ||
865 | 319 | |||
866 | 320 | #. module: base_contact_by_functions | ||
867 | 321 | #: view:res.partner:0 | ||
868 | 322 | msgid "Use address organism" | ||
869 | 323 | msgstr "Utiliser l'adresse de l'organisme" | ||
870 | 324 | |||
871 | 325 | #. module: base_contact_by_functions | ||
872 | 326 | #: field:functions,acronym:0 | ||
873 | 327 | msgid "Acronym" | ||
874 | 328 | msgstr "Acronyme" | ||
875 | 329 | |||
876 | 330 | #. module: base_contact_by_functions | ||
877 | 331 | #: help:functions,name:0 | ||
878 | 332 | msgid "Name of function." | ||
879 | 333 | msgstr "Nom de la fonction." | ||
880 | 334 | |||
881 | 335 | #. module: base_contact_by_functions | ||
882 | 336 | #: help:res.partner,passport_number:0 | ||
883 | 337 | msgid "Passport number." | ||
884 | 338 | msgstr "Numéro de passeport." | ||
885 | 339 | |||
886 | 340 | #. module: base_contact_by_functions | ||
887 | 341 | #: field:res.partner,passport_number:0 | ||
888 | 342 | msgid "Passport Number" | ||
889 | 343 | msgstr "Numéro de passeport." | ||
890 | 344 | |||
891 | 345 | #. module: base_contact_by_functions | ||
892 | 346 | #: model:ir.model,name:base_contact_by_functions.model_res_partner | ||
893 | 347 | msgid "Partner" | ||
894 | 348 | msgstr "Partenaire" | ||
895 | 349 | |||
896 | 350 | #. module: base_contact_by_functions | ||
897 | 351 | #: field:res.partner,naming:0 | ||
898 | 352 | msgid "Naming" | ||
899 | 353 | msgstr "Appellation" | ||
900 | 0 | 354 | ||
901 | === added file 'base_contact_by_functions/res_institutions.py' | |||
902 | --- base_contact_by_functions/res_institutions.py 1970-01-01 00:00:00 +0000 | |||
903 | +++ base_contact_by_functions/res_institutions.py 2014-04-30 15:00:54 +0000 | |||
904 | @@ -0,0 +1,49 @@ | |||
905 | 1 | # -*- encoding: utf-8 -*- | ||
906 | 2 | ############################################################################## | ||
907 | 3 | # | ||
908 | 4 | # OpenERP, Open Source Management Solution | ||
909 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
910 | 6 | # (<http://www.savoirfairelinux.com>). | ||
911 | 7 | # | ||
912 | 8 | # This program is free software: you can redistribute it and/or modify | ||
913 | 9 | # it under the terms of the GNU Affero General Public License as | ||
914 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
915 | 11 | # License, or (at your option) any later version. | ||
916 | 12 | # | ||
917 | 13 | # This program is distributed in the hope that it will be useful, | ||
918 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
919 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
920 | 16 | # GNU Affero General Public License for more details. | ||
921 | 17 | # | ||
922 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
923 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
924 | 20 | # | ||
925 | 21 | ############################################################################## | ||
926 | 22 | |||
927 | 23 | from openerp.osv import fields, orm | ||
928 | 24 | |||
929 | 25 | |||
930 | 26 | class res_institutions(orm.Model): | ||
931 | 27 | _description = 'Institutions' | ||
932 | 28 | _name = 'res.institution' | ||
933 | 29 | _order = 'sequence asc' | ||
934 | 30 | _columns = { | ||
935 | 31 | 'name': fields.char('Name', size=256, required=True, select=True, | ||
936 | 32 | help='Name of institution.'), | ||
937 | 33 | 'sequence': fields.integer('Sequence', help="Used to order the institutions"), | ||
938 | 34 | 'institutionfunction_ids': fields.one2many('res.institution.functions', 'institution_id', 'Functions'), | ||
939 | 35 | } | ||
940 | 36 | _sql_constraints = [('institution_name_unique', 'unique(name)', 'Name already exists')] | ||
941 | 37 | |||
942 | 38 | |||
943 | 39 | class res_institutions_functions(orm.Model): | ||
944 | 40 | _description = 'Institutions functions' | ||
945 | 41 | _name = 'res.institution.functions' | ||
946 | 42 | _order = 'sequence asc' | ||
947 | 43 | _columns = { | ||
948 | 44 | 'functions_id': fields.many2one('functions', 'Functions', required='True'), | ||
949 | 45 | 'sequence': fields.integer('Sequence', help="Used to order"), | ||
950 | 46 | 'institution_id': fields.many2one('res.institution', 'Institutions'), | ||
951 | 47 | } | ||
952 | 48 | |||
953 | 49 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
954 | 0 | 50 | ||
955 | === added file 'base_contact_by_functions/res_institutions_view.xml' | |||
956 | --- base_contact_by_functions/res_institutions_view.xml 1970-01-01 00:00:00 +0000 | |||
957 | +++ base_contact_by_functions/res_institutions_view.xml 2014-04-30 15:00:54 +0000 | |||
958 | @@ -0,0 +1,55 @@ | |||
959 | 1 | <?xml version="1.0" ?> | ||
960 | 2 | <openerp> | ||
961 | 3 | <data> | ||
962 | 4 | <!-- Tree Views Institutions--> | ||
963 | 5 | <record model="ir.ui.view" id="institutions_tree_view"> | ||
964 | 6 | <field name="name">Institutions Tree View</field> | ||
965 | 7 | <field name="model">res.institution</field> | ||
966 | 8 | <field name="type">tree</field> | ||
967 | 9 | <field name="arch" type="xml"> | ||
968 | 10 | <tree string="InstitutionsTree" version="7.0"> | ||
969 | 11 | <field name="name"/> | ||
970 | 12 | <field name="sequence"/> | ||
971 | 13 | </tree> | ||
972 | 14 | </field> | ||
973 | 15 | </record> | ||
974 | 16 | <!-- Form Views Institutions--> | ||
975 | 17 | <record model="ir.ui.view" id="institutions_form_view"> | ||
976 | 18 | <field name="name">Institutions Form View</field> | ||
977 | 19 | <field name="model">res.institution</field> | ||
978 | 20 | <field name="type">form</field> | ||
979 | 21 | <field name="arch" type="xml"> | ||
980 | 22 | <form string="InstitutionsForm" version="7.0" > | ||
981 | 23 | <group col="4"> | ||
982 | 24 | <field name="name"/> | ||
983 | 25 | <field name="sequence"/> | ||
984 | 26 | </group> | ||
985 | 27 | <notebook position="inside"> | ||
986 | 28 | <page string="Functions"> | ||
987 | 29 | <separator string="Add functions for this institution"/> | ||
988 | 30 | <group col="2" colspan="4"> | ||
989 | 31 | <field name="institutionfunction_ids" nolabel="1"> | ||
990 | 32 | <tree string="FunctionsTree"> | ||
991 | 33 | <field name="sequence"/> | ||
992 | 34 | <field name="functions_id"/> | ||
993 | 35 | </tree> | ||
994 | 36 | <form string="FunctionsForm"> | ||
995 | 37 | <field name="functions_id"/> | ||
996 | 38 | <field name="sequence"/> | ||
997 | 39 | </form> | ||
998 | 40 | </field> | ||
999 | 41 | </group> | ||
1000 | 42 | </page> | ||
1001 | 43 | </notebook> | ||
1002 | 44 | </form> | ||
1003 | 45 | </field> | ||
1004 | 46 | </record> | ||
1005 | 47 | <!-- Actions --> | ||
1006 | 48 | <record model="ir.actions.act_window" id="action_institutions_tree_list"> | ||
1007 | 49 | <field name="name">Institutions</field> | ||
1008 | 50 | <field name="view_id" ref="institutions_tree_view"/> | ||
1009 | 51 | <field name="res_model">res.institution</field> | ||
1010 | 52 | <field name="view_mode">tree,form</field> | ||
1011 | 53 | </record> | ||
1012 | 54 | </data> | ||
1013 | 55 | </openerp> | ||
1014 | 0 | 56 | ||
1015 | === added file 'base_contact_by_functions/res_partner.py' | |||
1016 | --- base_contact_by_functions/res_partner.py 1970-01-01 00:00:00 +0000 | |||
1017 | +++ base_contact_by_functions/res_partner.py 2014-04-30 15:00:54 +0000 | |||
1018 | @@ -0,0 +1,102 @@ | |||
1019 | 1 | # -*- encoding: utf-8 -*- | ||
1020 | 2 | ############################################################################## | ||
1021 | 3 | # | ||
1022 | 4 | # OpenERP, Open Source Management Solution | ||
1023 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1024 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1025 | 7 | # | ||
1026 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1027 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1028 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1029 | 11 | # License, or (at your option) any later version. | ||
1030 | 12 | # | ||
1031 | 13 | # This program is distributed in the hope that it will be useful, | ||
1032 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1033 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1034 | 16 | # GNU Affero General Public License for more details. | ||
1035 | 17 | # | ||
1036 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1037 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1038 | 20 | # | ||
1039 | 21 | ############################################################################## | ||
1040 | 22 | |||
1041 | 23 | import time | ||
1042 | 24 | from openerp.osv import orm, fields | ||
1043 | 25 | |||
1044 | 26 | |||
1045 | 27 | class res_partner_category(orm.Model): | ||
1046 | 28 | """ | ||
1047 | 29 | Inherits partner_category | ||
1048 | 30 | """ | ||
1049 | 31 | _inherit = 'res.partner.category' | ||
1050 | 32 | _columns = { | ||
1051 | 33 | 'categoryfunction_ids': fields.one2many('res.category.functions', 'category_id', 'Functions'), | ||
1052 | 34 | } | ||
1053 | 35 | |||
1054 | 36 | |||
1055 | 37 | class res_category_functions(orm.Model): | ||
1056 | 38 | """ | ||
1057 | 39 | Adds this class to link category and functions | ||
1058 | 40 | """ | ||
1059 | 41 | _description = 'Categories functions' | ||
1060 | 42 | _name = 'res.category.functions' | ||
1061 | 43 | _order = 'sequence asc' | ||
1062 | 44 | _columns = { | ||
1063 | 45 | 'functions_id': fields.many2one('functions', 'Functions', required='True'), | ||
1064 | 46 | 'sequence': fields.integer('Sequence', help="Used to order"), | ||
1065 | 47 | 'category_id': fields.many2one('res.partner.category', 'Category'), | ||
1066 | 48 | } | ||
1067 | 49 | |||
1068 | 50 | |||
1069 | 51 | class res_partner(orm.Model): | ||
1070 | 52 | """ | ||
1071 | 53 | Inherits partner and adds functions_ids : List of functions | ||
1072 | 54 | """ | ||
1073 | 55 | _inherit = 'res.partner' | ||
1074 | 56 | |||
1075 | 57 | def onchange_partner_function(self, cr, uid, ids, part, context=None): | ||
1076 | 58 | if not part: | ||
1077 | 59 | return {'value': None} | ||
1078 | 60 | partner_ids = self.pool.get('res.partner').search(cr, uid, [('id', '=', part)]) | ||
1079 | 61 | functions_ids = self.pool.get('res.partner').browse(cr, uid, partner_ids, context=context)[0].functions_ids | ||
1080 | 62 | result = [] | ||
1081 | 63 | if functions_ids: | ||
1082 | 64 | for line in functions_ids: | ||
1083 | 65 | result.append(line.id) | ||
1084 | 66 | dom = {'function_id': [('id', 'in', result)]} | ||
1085 | 67 | return {'domain': dom} | ||
1086 | 68 | |||
1087 | 69 | def _get_history_lines(self, cr, uid, ids, name, arg, context=None): | ||
1088 | 70 | res = {} | ||
1089 | 71 | res_partner_pool = self.pool.get('res.partner') | ||
1090 | 72 | for record in self.browse(cr, uid, ids, context=context): | ||
1091 | 73 | |||
1092 | 74 | if record.is_company: | ||
1093 | 75 | return res | ||
1094 | 76 | contact_ids = res_partner_pool.search(cr, uid, | ||
1095 | 77 | [('contact_id', '=', record.id), | ||
1096 | 78 | ('active', '=', False)], | ||
1097 | 79 | context=context) | ||
1098 | 80 | res[record.id] = [x.id for x in res_partner_pool.browse(cr, uid, contact_ids) | ||
1099 | 81 | if x.end_date and x.end_date <= time.strftime('%Y-%m-%d')] | ||
1100 | 82 | return res | ||
1101 | 83 | |||
1102 | 84 | _columns = { | ||
1103 | 85 | 'functions_ids': fields.many2many('functions', 'function_partner_rel', 'partner_id', | ||
1104 | 86 | 'function_id', 'Functions'), | ||
1105 | 87 | 'start_date': fields.date('Start date'), | ||
1106 | 88 | 'end_date': fields.date('End date'), | ||
1107 | 89 | 'naming': fields.char('Naming', size=256, help="Naming."), | ||
1108 | 90 | 'function_id': fields.many2one('functions', 'Position Occupied'), | ||
1109 | 91 | 'other_contact_history_ids': fields.function(_get_history_lines, | ||
1110 | 92 | relation="res.partner", | ||
1111 | 93 | method=True, | ||
1112 | 94 | type="one2many"), | ||
1113 | 95 | # Replace company by Organism | ||
1114 | 96 | 'use_parent_address': fields.boolean( | ||
1115 | 97 | 'Use Organism Address', | ||
1116 | 98 | help="Select this if you want to set organism's address information for this contact"), | ||
1117 | 99 | |||
1118 | 100 | } | ||
1119 | 101 | |||
1120 | 102 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1121 | 0 | 103 | ||
1122 | === added file 'base_contact_by_functions/res_partner_view.xml' | |||
1123 | --- base_contact_by_functions/res_partner_view.xml 1970-01-01 00:00:00 +0000 | |||
1124 | +++ base_contact_by_functions/res_partner_view.xml 2014-04-30 15:00:54 +0000 | |||
1125 | @@ -0,0 +1,526 @@ | |||
1126 | 1 | <?xml version = "1.0" encoding="utf-8"?> | ||
1127 | 2 | <openerp> | ||
1128 | 3 | <data> | ||
1129 | 4 | <!--Add list of functions in partner view--> | ||
1130 | 5 | <record id="view_contact_by_function_form" model="ir.ui.view"> | ||
1131 | 6 | <field name="name">contact.functions.form.inherit</field> | ||
1132 | 7 | <field name="model">res.partner</field> | ||
1133 | 8 | <field name="inherit_id" ref="base.view_partner_form"/> | ||
1134 | 9 | <field name="arch" type="xml"> | ||
1135 | 10 | <field name="use_parent_address" position="replace"> | ||
1136 | 11 | <field name="use_parent_address" | ||
1137 | 12 | class="oe_edit_only oe_inline" | ||
1138 | 13 | on_change="onchange_address(use_parent_address, parent_id)" | ||
1139 | 14 | attrs="{'invisible': [('parent_id','=', False),('use_parent_address','=',False)]}" | ||
1140 | 15 | string="Use organism address"/> | ||
1141 | 16 | </field> | ||
1142 | 17 | <label for="use_parent_address" position="replace"> | ||
1143 | 18 | <label for="use_parent_address" | ||
1144 | 19 | class="oe_edit_only" | ||
1145 | 20 | attrs="{'invisible': [('parent_id','=', False),('use_parent_address','=',False)]}" | ||
1146 | 21 | string="Use organism address"/> | ||
1147 | 22 | </label> | ||
1148 | 23 | <!--Add ')' at the end of 'Is an Organism?'--> | ||
1149 | 24 | <label for="is_company" position="replace"> | ||
1150 | 25 | <label for="is_company" string="Is an Organism"/>) | ||
1151 | 26 | </label> | ||
1152 | 27 | <!--Replace Street placeholder by No, Street, Apartment/Office--> | ||
1153 | 28 | <field name="street" position="attributes"> | ||
1154 | 29 | <attribute name="placeholder">No, Street, Apartment/Office</attribute> | ||
1155 | 30 | </field> | ||
1156 | 31 | <field name="fax" position="attributes"> | ||
1157 | 32 | <attribute name="string">Fax</attribute> | ||
1158 | 33 | </field> | ||
1159 | 34 | |||
1160 | 35 | <notebook position="inside"> | ||
1161 | 36 | <page string="Functions" | ||
1162 | 37 | attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}" | ||
1163 | 38 | autofocus="autofocus"> | ||
1164 | 39 | <separator string="Select functions for this organism"/> | ||
1165 | 40 | <field name="functions_ids"/> | ||
1166 | 41 | </page> | ||
1167 | 42 | <page string="History (Functions)" attrs="{'invisible': ['|','|',('is_company','=',True),('contact_id','!=',False),('other_contact_history_ids','=',[])]}"> | ||
1168 | 43 | <separator string="History"/> | ||
1169 | 44 | <field name="other_contact_history_ids" mode="kanban" | ||
1170 | 45 | attrs="{'invisible': [('other_contact_history_ids','=',False)]}"> | ||
1171 | 46 | <kanban> | ||
1172 | 47 | <field name="color"/> | ||
1173 | 48 | <field name="name"/> | ||
1174 | 49 | <field name="title"/> | ||
1175 | 50 | <field name="email"/> | ||
1176 | 51 | <field name="parent_id" string="Organism"/> | ||
1177 | 52 | <field name="is_company"/> | ||
1178 | 53 | <field name="function_id" string="Function"/> | ||
1179 | 54 | <field name="phone"/> | ||
1180 | 55 | <field name="street"/> | ||
1181 | 56 | <field name="street2"/> | ||
1182 | 57 | <field name="zip"/> | ||
1183 | 58 | <field name="city"/> | ||
1184 | 59 | <field name="country_id"/> | ||
1185 | 60 | <field name="mobile"/> | ||
1186 | 61 | <field name="fax"/> | ||
1187 | 62 | <field name="state_id"/> | ||
1188 | 63 | <field name="has_image"/> | ||
1189 | 64 | <templates> | ||
1190 | 65 | <t t-name="kanban-box"> | ||
1191 | 66 | <div class="oe_kanban_vignette oe_semantic_html_override"> | ||
1192 | 67 | <a type="open"> | ||
1193 | 68 | <t t-if="record.has_image.raw_value === true"> | ||
1194 | 69 | <img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)" | ||
1195 | 70 | class="oe_kanban_image"/> | ||
1196 | 71 | </t> | ||
1197 | 72 | <t t-if="record.has_image.raw_value === false"> | ||
1198 | 73 | <t t-if="record.is_company.raw_value === true"> | ||
1199 | 74 | <img t-att-src='_s + "/base/static/src/img/company_image.png"' | ||
1200 | 75 | class="oe_kanban_image"/> | ||
1201 | 76 | </t> | ||
1202 | 77 | <t t-if="record.is_company.raw_value === false"> | ||
1203 | 78 | <img t-att-src='_s + "/base/static/src/img/avatar.png"' | ||
1204 | 79 | class="oe_kanban_image"/> | ||
1205 | 80 | </t> | ||
1206 | 81 | </t> | ||
1207 | 82 | </a> | ||
1208 | 83 | <div class="oe_kanban_details"> | ||
1209 | 84 | <h4 class="oe_partner_heading"> | ||
1210 | 85 | <a type="open"> | ||
1211 | 86 | <field name="name"/> | ||
1212 | 87 | </a> | ||
1213 | 88 | </h4> | ||
1214 | 89 | <div class="oe_kanban_partner_categories"/> | ||
1215 | 90 | <div class="oe_kanban_partner_links"/> | ||
1216 | 91 | <ul> | ||
1217 | 92 | <li t-if="!record.parent_id.raw_value and record.function_id.raw_value"> | ||
1218 | 93 | <field name="function_id"/> | ||
1219 | 94 | </li> | ||
1220 | 95 | <li t-if="record.parent_id.raw_value and record.function_id.raw_value"> | ||
1221 | 96 | <field name="function_id"/> | ||
1222 | 97 | , | ||
1223 | 98 | <field name="parent_id"/> | ||
1224 | 99 | </li> | ||
1225 | 100 | <li t-if="record.city.raw_value and !record.country.raw_value"> | ||
1226 | 101 | <field name="city"/> | ||
1227 | 102 | </li> | ||
1228 | 103 | <li t-if="!record.city.raw_value and record.country.raw_value"> | ||
1229 | 104 | <field name="country"/> | ||
1230 | 105 | </li> | ||
1231 | 106 | <li t-if="record.city.raw_value and record.country.raw_value"> | ||
1232 | 107 | <field name="city"/> | ||
1233 | 108 | , | ||
1234 | 109 | <field name="country"/> | ||
1235 | 110 | </li> | ||
1236 | 111 | <li t-if="record.email.raw_value"> | ||
1237 | 112 | <a t-attf-href="mailto:#{record.email.raw_value}"> | ||
1238 | 113 | <field name="email"/> | ||
1239 | 114 | </a> | ||
1240 | 115 | </li> | ||
1241 | 116 | </ul> | ||
1242 | 117 | </div> | ||
1243 | 118 | </div> | ||
1244 | 119 | </t> | ||
1245 | 120 | </templates> | ||
1246 | 121 | </kanban> | ||
1247 | 122 | <form string="Contact" version="7.0"> | ||
1248 | 123 | <sheet> | ||
1249 | 124 | <field name="image" widget='image' class="oe_avatar oe_left" | ||
1250 | 125 | options='{"preview_image": "image_medium"}'/> | ||
1251 | 126 | <div class="oe_title"> | ||
1252 | 127 | <label for="name" class="oe_edit_only"/> | ||
1253 | 128 | <h1> | ||
1254 | 129 | <field name="name" style="width: 70%%"/> | ||
1255 | 130 | </h1> | ||
1256 | 131 | </div> | ||
1257 | 132 | <group> | ||
1258 | 133 | <!-- inherited part --> | ||
1259 | 134 | <field name="category_id" widget="many2many_tags" | ||
1260 | 135 | placeholder="Tags..." style="width: 70%%" string="Tag"/> | ||
1261 | 136 | <field name="parent_id" | ||
1262 | 137 | placeholder="Organism" | ||
1263 | 138 | domain="[('is_company','=',True)]" | ||
1264 | 139 | string="Parent Organism"/> | ||
1265 | 140 | <!-- inherited part end --> | ||
1266 | 141 | <field name="function_id" placeholder="e.g. Sales Director"/> | ||
1267 | 142 | <group colspan="4"> | ||
1268 | 143 | <field name="start_date" /> | ||
1269 | 144 | <field name="end_date"/> | ||
1270 | 145 | <field name="naming"/> | ||
1271 | 146 | </group> | ||
1272 | 147 | <field name="email"/> | ||
1273 | 148 | <field name="phone"/> | ||
1274 | 149 | <field name="mobile"/> | ||
1275 | 150 | </group> | ||
1276 | 151 | <div> | ||
1277 | 152 | <field name="use_parent_address"/> | ||
1278 | 153 | <label for="use_parent_address" string="Use organism address"/> | ||
1279 | 154 | </div> | ||
1280 | 155 | <group> | ||
1281 | 156 | <label for="type"/> | ||
1282 | 157 | <div name="div_type"> | ||
1283 | 158 | <field class="oe_inline" name="type"/> | ||
1284 | 159 | </div> | ||
1285 | 160 | <label for="street" string="Address" | ||
1286 | 161 | attrs="{'invisible': [('use_parent_address','=', True)]}"/> | ||
1287 | 162 | <div attrs="{'invisible': [('use_parent_address','=', True)]}" | ||
1288 | 163 | name="div_address"> | ||
1289 | 164 | <field name="street" placeholder="Street..."/> | ||
1290 | 165 | <field name="street2"/> | ||
1291 | 166 | <div class="address_format"> | ||
1292 | 167 | <field name="city" placeholder="City" style="width: 40%%"/> | ||
1293 | 168 | <field name="state_id" class="oe_no_button" | ||
1294 | 169 | placeholder="State" style="width: 37%%" | ||
1295 | 170 | options='{"no_open": True}' on_change="onchange_state(state_id)"/> | ||
1296 | 171 | <field name="zip" placeholder="ZIP" style="width: 20%%"/> | ||
1297 | 172 | </div> | ||
1298 | 173 | <field name="country_id" placeholder="Country" | ||
1299 | 174 | class="oe_no_button" options='{"no_open": True}'/> | ||
1300 | 175 | </div> | ||
1301 | 176 | </group> | ||
1302 | 177 | <field name="supplier" invisible="True"/> | ||
1303 | 178 | <group string="Bank Accounts"> | ||
1304 | 179 | <field name="bank_ids" nolabel="1"> | ||
1305 | 180 | <tree string="Bank Details"> | ||
1306 | 181 | <field name="state" invisible="1"/> | ||
1307 | 182 | <field name="sequence" invisible="1"/> | ||
1308 | 183 | <field name="acc_number"/> | ||
1309 | 184 | <field name="bank_name"/> | ||
1310 | 185 | <field name="owner_name"/> | ||
1311 | 186 | </tree> | ||
1312 | 187 | </field> | ||
1313 | 188 | </group> | ||
1314 | 189 | </sheet> | ||
1315 | 190 | </form> | ||
1316 | 191 | </field> | ||
1317 | 192 | </page> | ||
1318 | 193 | </notebook> | ||
1319 | 194 | <!--Replace function by function_id defined by organism--> | ||
1320 | 195 | <field name="function" position="replace"/> | ||
1321 | 196 | </field> | ||
1322 | 197 | |||
1323 | 198 | </record> | ||
1324 | 199 | <!--Add start_date, end_date, naming and account bank in partner view--> | ||
1325 | 200 | <record id="view_position_info_form" model="ir.ui.view"> | ||
1326 | 201 | <field name="name">position.info.form.inherit</field> | ||
1327 | 202 | <field name="model">res.partner</field> | ||
1328 | 203 | <field name="inherit_id" ref="base_contact.view_partner_form_inherit"/> | ||
1329 | 204 | <field name="arch" type="xml"> | ||
1330 | 205 | <xpath expr="//field[@name='other_contact_ids']/form//field[@name='category_id']" | ||
1331 | 206 | position="attributes"> | ||
1332 | 207 | <attribute name="string">Tag</attribute> | ||
1333 | 208 | </xpath> | ||
1334 | 209 | <xpath expr="//field[@name='other_contact_ids']/form//field[@name='function']" | ||
1335 | 210 | position="after"> | ||
1336 | 211 | <group colspan="4"> | ||
1337 | 212 | <field name="start_date" /> | ||
1338 | 213 | <field name="end_date"/> | ||
1339 | 214 | <field name="naming"/> | ||
1340 | 215 | </group> | ||
1341 | 216 | </xpath> | ||
1342 | 217 | <xpath expr="//field[@name='other_contact_ids']/form//field[@name='supplier']" | ||
1343 | 218 | position="after"> | ||
1344 | 219 | <group string="Bank Accounts"> | ||
1345 | 220 | <field name="bank_ids" nolabel="1"/> | ||
1346 | 221 | </group> | ||
1347 | 222 | </xpath> | ||
1348 | 223 | <xpath expr="//field[@name='other_contact_ids']/form//field[@name='parent_id']" | ||
1349 | 224 | position="replace"> | ||
1350 | 225 | <group colspan="4"> | ||
1351 | 226 | <field name="parent_id" placeholder="Organism" | ||
1352 | 227 | domain="[('is_company','=',True)]" | ||
1353 | 228 | on_change="onchange_partner_function(parent_id)" | ||
1354 | 229 | string="Parent Organism"/> | ||
1355 | 230 | </group> | ||
1356 | 231 | </xpath> | ||
1357 | 232 | <xpath expr="//field[@name='other_contact_ids']/form//field[@name='function']" | ||
1358 | 233 | position="replace"> | ||
1359 | 234 | <group colspan="4"> | ||
1360 | 235 | <field name="function_id" string="Function"/> | ||
1361 | 236 | </group> | ||
1362 | 237 | </xpath> | ||
1363 | 238 | <xpath expr="//field[@name='other_contact_ids']/form//label[@for='use_parent_address']" | ||
1364 | 239 | position="replace"> | ||
1365 | 240 | <label for="use_parent_address" string="Use address organism"/> | ||
1366 | 241 | </xpath> | ||
1367 | 242 | <xpath expr="//field[@name='other_contact_ids']/kanban//field[@name='function']" | ||
1368 | 243 | position="replace"> | ||
1369 | 244 | <group colspan="4"> | ||
1370 | 245 | <field name="function_id" string="Function"/> | ||
1371 | 246 | </group> | ||
1372 | 247 | </xpath> | ||
1373 | 248 | <xpath expr="//field[@name='other_contact_ids']/kanban//field[@name='has_image']" | ||
1374 | 249 | position="after"> | ||
1375 | 250 | <templates> | ||
1376 | 251 | <t t-name="kanban-box"> | ||
1377 | 252 | <t t-set="color" t-value="kanban_color(record.color.raw_value)"/> | ||
1378 | 253 | <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" | ||
1379 | 254 | style="position: relative"> | ||
1380 | 255 | <a t-if="! read_only_mode" type="delete" | ||
1381 | 256 | style="position: absolute; right: 0; padding: 4px; diplay: inline-block"> | ||
1382 | 257 | X | ||
1383 | 258 | </a> | ||
1384 | 259 | <div class="oe_module_vignette"> | ||
1385 | 260 | <a type="open"> | ||
1386 | 261 | <t t-if="record.has_image.raw_value === true"> | ||
1387 | 262 | <img t-att-src="kanban_image('res.partner', 'image', | ||
1388 | 263 | record.id.value, {'preview_image': 'image_small'})" | ||
1389 | 264 | class="oe_avatar oe_kanban_avatar_smallbox"/> | ||
1390 | 265 | </t> | ||
1391 | 266 | <t t-if="record.image and record.image.raw_value !== false"> | ||
1392 | 267 | <img t-att-src="'data:image/png;base64,'+record.image.raw_value" | ||
1393 | 268 | class="oe_avatar oe_kanban_avatar_smallbox"/> | ||
1394 | 269 | </t> | ||
1395 | 270 | <t t-if="record.has_image.raw_value === false | ||
1396 | 271 | and (!record.image or record.image.raw_value === false)"> | ||
1397 | 272 | <t t-if="record.is_company.raw_value === true"> | ||
1398 | 273 | <img t-att-src='_s + "/base/static/src/img/company_image.png"' | ||
1399 | 274 | class="oe_kanban_image oe_kanban_avatar_smallbox"/> | ||
1400 | 275 | </t> | ||
1401 | 276 | <t t-if="record.is_company.raw_value === false"> | ||
1402 | 277 | <img t-att-src='_s + "/base/static/src/img/avatar.png"' | ||
1403 | 278 | class="oe_kanban_image oe_kanban_avatar_smallbox"/> | ||
1404 | 279 | </t> | ||
1405 | 280 | </t> | ||
1406 | 281 | </a> | ||
1407 | 282 | <div class="oe_module_desc"> | ||
1408 | 283 | <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border"> | ||
1409 | 284 | <table class="oe_kanban_table"> | ||
1410 | 285 | <tr> | ||
1411 | 286 | <td class="oe_kanban_title1" align="left" valign="middle"> | ||
1412 | 287 | <h4> | ||
1413 | 288 | <a type="open"> | ||
1414 | 289 | <field name="name"/> | ||
1415 | 290 | </a> | ||
1416 | 291 | </h4> | ||
1417 | 292 | <i> | ||
1418 | 293 | <t t-if="record.parent_id.raw_value and !record.function_id.raw_value"> | ||
1419 | 294 | <field name="parent_id"/> | ||
1420 | 295 | </t> | ||
1421 | 296 | <t t-if="!record.parent_id.raw_value and record.function_id.raw_value"> | ||
1422 | 297 | <field name="function_id"/> | ||
1423 | 298 | </t> | ||
1424 | 299 | <t t-if="record.parent_id.raw_value and record.function_id.raw_value"> | ||
1425 | 300 | <field name="function_id"/> | ||
1426 | 301 | , | ||
1427 | 302 | <field name="parent_id"/> | ||
1428 | 303 | </t> | ||
1429 | 304 | </i> | ||
1430 | 305 | <div> | ||
1431 | 306 | <a t-if="record.email.raw_value" title="Mail" | ||
1432 | 307 | t-att-href="'mailto:'+record.email.value"> | ||
1433 | 308 | <field name="email"/> | ||
1434 | 309 | </a> | ||
1435 | 310 | </div> | ||
1436 | 311 | <div t-if="record.phone.raw_value"> | ||
1437 | 312 | Phone: <field name="phone"/> | ||
1438 | 313 | </div> | ||
1439 | 314 | <div t-if="record.mobile.raw_value"> | ||
1440 | 315 | Mobile: <field name="mobile"/> | ||
1441 | 316 | </div> | ||
1442 | 317 | <div t-if="record.fax.raw_value"> | ||
1443 | 318 | Fax: <field name="fax"/> | ||
1444 | 319 | </div> | ||
1445 | 320 | </td> | ||
1446 | 321 | </tr> | ||
1447 | 322 | </table> | ||
1448 | 323 | </div> | ||
1449 | 324 | </div> | ||
1450 | 325 | </div> | ||
1451 | 326 | </div> | ||
1452 | 327 | </t> | ||
1453 | 328 | </templates> | ||
1454 | 329 | </xpath> | ||
1455 | 330 | have the same form for contact and other postions | ||
1456 | 331 | <field name="parent_id" position="replace"> | ||
1457 | 332 | <field name="parent_id" placeholder="Parent organism" | ||
1458 | 333 | domain="[('is_company','=',True)]" | ||
1459 | 334 | attrs="{'invisible': [('is_company','=', False)]}"/> | ||
1460 | 335 | </field> | ||
1461 | 336 | <xpath expr="//field[@name='child_ids']/form//field[@name='supplier']" | ||
1462 | 337 | position="after"> | ||
1463 | 338 | <group string="Bank Accounts"> | ||
1464 | 339 | <field name="bank_ids" nolabel="1"/> | ||
1465 | 340 | </group> | ||
1466 | 341 | </xpath> | ||
1467 | 342 | |||
1468 | 343 | <xpath expr="//field[@name='child_ids']/form//field[@name='function']" | ||
1469 | 344 | position="after"> | ||
1470 | 345 | <group colspan="4"> | ||
1471 | 346 | <field name="start_date" /> | ||
1472 | 347 | <field name="end_date"/> | ||
1473 | 348 | <field name="naming"/> | ||
1474 | 349 | </group> | ||
1475 | 350 | </xpath> | ||
1476 | 351 | <xpath expr="//field[@name='child_ids']/form//field[@name='function']" | ||
1477 | 352 | position="replace"> | ||
1478 | 353 | <group colspan="4"> | ||
1479 | 354 | <field name="parent_id" | ||
1480 | 355 | placeholder="Organism" | ||
1481 | 356 | domain="[('is_company','=',True)]" | ||
1482 | 357 | string="Parent organism" /> | ||
1483 | 358 | <field name="function_id" | ||
1484 | 359 | readonly="False" | ||
1485 | 360 | domain="[('id', 'in', parent.functions_ids[0][2])]" | ||
1486 | 361 | string="Function"/> | ||
1487 | 362 | </group> | ||
1488 | 363 | </xpath> | ||
1489 | 364 | |||
1490 | 365 | <xpath expr="//field[@name='child_ids']/form//label[@for='use_parent_address']" | ||
1491 | 366 | position="replace"> | ||
1492 | 367 | <label for="use_parent_address" string="Use address organism"/> | ||
1493 | 368 | </xpath> | ||
1494 | 369 | |||
1495 | 370 | <xpath expr="//field[@name='child_ids']/kanban//field[@name='function']" | ||
1496 | 371 | position="replace"> | ||
1497 | 372 | <group colspan="4"> | ||
1498 | 373 | <field name="function_id" string="Function"/> | ||
1499 | 374 | </group> | ||
1500 | 375 | </xpath> | ||
1501 | 376 | <xpath expr="//field[@name='other_contact_ids']/kanban//field[@name='has_image']" | ||
1502 | 377 | position="after"> | ||
1503 | 378 | <templates> | ||
1504 | 379 | <t t-name="kanban-box"> | ||
1505 | 380 | <div class="oe_kanban_vignette oe_semantic_html_override"> | ||
1506 | 381 | <a type="open"> | ||
1507 | 382 | <t t-if="record.has_image.raw_value === true"> | ||
1508 | 383 | <img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)" | ||
1509 | 384 | class="oe_kanban_image"/> | ||
1510 | 385 | </t> | ||
1511 | 386 | <t t-if="record.has_image.raw_value === false"> | ||
1512 | 387 | <t t-if="record.is_company.raw_value === true"> | ||
1513 | 388 | <img t-att-src='_s + "/base/static/src/img/company_image.png"' | ||
1514 | 389 | class="oe_kanban_image"/> | ||
1515 | 390 | </t> | ||
1516 | 391 | <t t-if="record.is_company.raw_value === false"> | ||
1517 | 392 | <img t-att-src='_s + "/base/static/src/img/avatar.png"' | ||
1518 | 393 | class="oe_kanban_image"/> | ||
1519 | 394 | </t> | ||
1520 | 395 | </t> | ||
1521 | 396 | </a> | ||
1522 | 397 | <div class="oe_kanban_details"> | ||
1523 | 398 | <h4 class="oe_partner_heading"> | ||
1524 | 399 | <a type="open"> | ||
1525 | 400 | <field name="name"/> | ||
1526 | 401 | </a> | ||
1527 | 402 | </h4> | ||
1528 | 403 | <div class="oe_kanban_partner_categories"/> | ||
1529 | 404 | <div class="oe_kanban_partner_links"/> | ||
1530 | 405 | <ul> | ||
1531 | 406 | <li t-if="record.parent_id.raw_value and !record.function_id.raw_value"> | ||
1532 | 407 | <field name="parent_id"/> | ||
1533 | 408 | </li> | ||
1534 | 409 | <li t-if="!record.parent_id.raw_value and record.function_id.raw_value"> | ||
1535 | 410 | <field name="function_id"/> | ||
1536 | 411 | </li> | ||
1537 | 412 | <li t-if="record.parent_id.raw_value and record.function_id.raw_value"> | ||
1538 | 413 | <field name="function_id"/> | ||
1539 | 414 | , | ||
1540 | 415 | <field name="parent_id"/> | ||
1541 | 416 | </li> | ||
1542 | 417 | <li t-if="record.city.raw_value and !record.country.raw_value"> | ||
1543 | 418 | <field name="city"/> | ||
1544 | 419 | </li> | ||
1545 | 420 | <li t-if="!record.city.raw_value and record.country.raw_value"> | ||
1546 | 421 | <field name="country"/> | ||
1547 | 422 | </li> | ||
1548 | 423 | <li t-if="record.city.raw_value and record.country.raw_value"> | ||
1549 | 424 | <field name="city"/> | ||
1550 | 425 | , | ||
1551 | 426 | <field name="country"/> | ||
1552 | 427 | </li> | ||
1553 | 428 | <li t-if="record.email.raw_value"> | ||
1554 | 429 | <a t-attf-href="mailto:#{record.email.raw_value}"> | ||
1555 | 430 | <field name="email"/> | ||
1556 | 431 | </a> | ||
1557 | 432 | </li> | ||
1558 | 433 | </ul> | ||
1559 | 434 | </div> | ||
1560 | 435 | </div> | ||
1561 | 436 | </t> | ||
1562 | 437 | </templates> | ||
1563 | 438 | </xpath> | ||
1564 | 439 | </field> | ||
1565 | 440 | </record> | ||
1566 | 441 | <!-- Actions for organism --> | ||
1567 | 442 | <record id="action_partner_customer_form" model="ir.actions.act_window"> | ||
1568 | 443 | <field name="name">Company</field> | ||
1569 | 444 | <field name="type">ir.actions.act_window</field> | ||
1570 | 445 | <field name="res_model">res.partner</field> | ||
1571 | 446 | <field name="view_type">form</field> | ||
1572 | 447 | <field name="view_mode">kanban,tree,form</field> | ||
1573 | 448 | <field name="domain">[('is_company','=',1)]</field> | ||
1574 | 449 | <field name="context" eval="{'default_is_company': True}"/> | ||
1575 | 450 | <field name="filter" eval="True"/> | ||
1576 | 451 | </record> | ||
1577 | 452 | <!-- Actions for Contacts --> | ||
1578 | 453 | <record id="action_partner_contact_form" model="ir.actions.act_window"> | ||
1579 | 454 | <field name="name">Contacts</field> | ||
1580 | 455 | <field name="type">ir.actions.act_window</field> | ||
1581 | 456 | <field name="res_model">res.partner</field> | ||
1582 | 457 | <field name="view_type">form</field> | ||
1583 | 458 | <field name="view_mode">kanban,tree,form</field> | ||
1584 | 459 | <field name="domain">[('is_company','=',0)]</field> | ||
1585 | 460 | <field name="filter" eval="True"/> | ||
1586 | 461 | </record> | ||
1587 | 462 | |||
1588 | 463 | <!--Add country,street fields in tree partner view--> | ||
1589 | 464 | <record model="ir.ui.view" id="view_partner_tree_country_address"> | ||
1590 | 465 | <field name="model">res.partner</field> | ||
1591 | 466 | <field name="inherit_id" ref="base.view_partner_tree"/> | ||
1592 | 467 | <field name="arch" type="xml"> | ||
1593 | 468 | <field name="country_id" position="replace"/> | ||
1594 | 469 | <field name="name" position="after"> | ||
1595 | 470 | <field name="country_id"/> | ||
1596 | 471 | </field> | ||
1597 | 472 | <field name="email" position="after"> | ||
1598 | 473 | <field name="street" string="Address"/> | ||
1599 | 474 | </field> | ||
1600 | 475 | </field> | ||
1601 | 476 | </record> | ||
1602 | 477 | |||
1603 | 478 | <!-- Inherit Categories adding functions --> | ||
1604 | 479 | <record id="view_partner_category_functions_form" model="ir.ui.view"> | ||
1605 | 480 | <field name="name">Partner Categories Functions</field> | ||
1606 | 481 | <field name="model">res.partner.category</field> | ||
1607 | 482 | <field name="inherit_id" ref="base.view_partner_category_form"/> | ||
1608 | 483 | <field name="arch" type="xml"> | ||
1609 | 484 | <xpath expr="//form[@string='Partner Category']/group[1]" | ||
1610 | 485 | position="after"> | ||
1611 | 486 | <notebook position="inside"> | ||
1612 | 487 | <page string="Functions"> | ||
1613 | 488 | <separator string="Add function"/> | ||
1614 | 489 | <group col="2" colspan="4"> | ||
1615 | 490 | <field name="categoryfunction_ids" nolabel="1"> | ||
1616 | 491 | <tree string="FunctionsTree"> | ||
1617 | 492 | <field name="sequence"/> | ||
1618 | 493 | <field name="functions_id"/> | ||
1619 | 494 | </tree> | ||
1620 | 495 | <form string="FunctionsForm"> | ||
1621 | 496 | <field name="functions_id"/> | ||
1622 | 497 | <field name="sequence"/> | ||
1623 | 498 | </form> | ||
1624 | 499 | </field> | ||
1625 | 500 | </group> | ||
1626 | 501 | </page> | ||
1627 | 502 | </notebook> | ||
1628 | 503 | </xpath> | ||
1629 | 504 | </field> | ||
1630 | 505 | </record> | ||
1631 | 506 | |||
1632 | 507 | <!--Replace company by organism--> | ||
1633 | 508 | <record id="view_partner_simple_form" model="ir.ui.view"> | ||
1634 | 509 | <field name="name">res.partner.simplified.form</field> | ||
1635 | 510 | <field name="model">res.partner</field> | ||
1636 | 511 | <field name="arch" type="xml"> | ||
1637 | 512 | <label for="is_company" position="replace"> | ||
1638 | 513 | <label for="is_company" string="Is an Organism"/> | ||
1639 | 514 | </label> | ||
1640 | 515 | <field name="parent_id" position="replace"> | ||
1641 | 516 | <field name="parent_id" | ||
1642 | 517 | placeholder="Organism" | ||
1643 | 518 | domain="[('is_company', '=', True)]" | ||
1644 | 519 | context="{'default_is_company': True, 'default_supplier': supplier}" | ||
1645 | 520 | attrs="{'invisible': [('is_company','=', True),('parent_id', '=', False)]}" | ||
1646 | 521 | on_change="onchange_address(use_parent_address, parent_id)"/> | ||
1647 | 522 | </field> | ||
1648 | 523 | </field> | ||
1649 | 524 | </record> | ||
1650 | 525 | </data> | ||
1651 | 526 | </openerp> | ||
1652 | 0 | 527 | ||
1653 | === added directory 'base_contact_by_functions/security' | |||
1654 | === added file 'base_contact_by_functions/security/ir.model.access.csv' | |||
1655 | --- base_contact_by_functions/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 | |||
1656 | +++ base_contact_by_functions/security/ir.model.access.csv 2014-04-30 15:00:54 +0000 | |||
1657 | @@ -0,0 +1,5 @@ | |||
1658 | 1 | "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" | ||
1659 | 2 | "access_functions","functions_user","model_functions","base.group_user",1,1,1,1 | ||
1660 | 3 | "access_res_category_functions","access_res_category_functions_user","model_res_category_functions","base.group_user",1,1,1,1 | ||
1661 | 4 | "access_res_institution","access_res_institution_user","model_res_institution","base.group_user",1,1,1,1 | ||
1662 | 5 | "access_res_institution_functions","access_res_institution_functions_user","model_res_institution_functions","base.group_user",1,1,1,1 | ||
1663 | 0 | 6 | ||
1664 | === added directory 'base_contact_by_functions/tests' | |||
1665 | === added file 'base_contact_by_functions/tests/__init__.py' | |||
1666 | --- base_contact_by_functions/tests/__init__.py 1970-01-01 00:00:00 +0000 | |||
1667 | +++ base_contact_by_functions/tests/__init__.py 2014-04-30 15:00:54 +0000 | |||
1668 | @@ -0,0 +1,31 @@ | |||
1669 | 1 | # -*- encoding: utf-8 -*- | ||
1670 | 2 | ############################################################################## | ||
1671 | 3 | # | ||
1672 | 4 | # OpenERP, Open Source Management Solution | ||
1673 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1674 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1675 | 7 | # | ||
1676 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1677 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1678 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1679 | 11 | # License, or (at your option) any later version. | ||
1680 | 12 | # | ||
1681 | 13 | # This program is distributed in the hope that it will be useful, | ||
1682 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1683 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1684 | 16 | # GNU Affero General Public License for more details. | ||
1685 | 17 | # | ||
1686 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1687 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1688 | 20 | # | ||
1689 | 21 | ############################################################################## | ||
1690 | 22 | |||
1691 | 23 | from . import test_functions | ||
1692 | 24 | from . import test_institutions | ||
1693 | 25 | from . import test_partner_category | ||
1694 | 26 | |||
1695 | 27 | checks = [ | ||
1696 | 28 | test_functions, | ||
1697 | 29 | test_institutions, | ||
1698 | 30 | test_partner_category | ||
1699 | 31 | ] | ||
1700 | 0 | 32 | ||
1701 | === added file 'base_contact_by_functions/tests/test_functions.py' | |||
1702 | --- base_contact_by_functions/tests/test_functions.py 1970-01-01 00:00:00 +0000 | |||
1703 | +++ base_contact_by_functions/tests/test_functions.py 2014-04-30 15:00:54 +0000 | |||
1704 | @@ -0,0 +1,98 @@ | |||
1705 | 1 | # -*- encoding: utf-8 -*- | ||
1706 | 2 | ############################################################################## | ||
1707 | 3 | # | ||
1708 | 4 | # OpenERP, Open Source Management Solution | ||
1709 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1710 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1711 | 7 | # | ||
1712 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1713 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1714 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1715 | 11 | # License, or (at your option) any later version. | ||
1716 | 12 | # | ||
1717 | 13 | # This program is distributed in the hope that it will be useful, | ||
1718 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1719 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1720 | 16 | # GNU Affero General Public License for more details. | ||
1721 | 17 | # | ||
1722 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1723 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1724 | 20 | # | ||
1725 | 21 | ############################################################################## | ||
1726 | 22 | |||
1727 | 23 | from openerp.tests.common import TransactionCase | ||
1728 | 24 | from openerp.osv.orm import browse_record | ||
1729 | 25 | |||
1730 | 26 | |||
1731 | 27 | class Base_Test_function(TransactionCase): | ||
1732 | 28 | """ | ||
1733 | 29 | Simple test creating a function | ||
1734 | 30 | This is a base class for function test cases. | ||
1735 | 31 | Inherit from this and setup values. | ||
1736 | 32 | """ | ||
1737 | 33 | |||
1738 | 34 | def setUp(self, vals={}): | ||
1739 | 35 | """ | ||
1740 | 36 | Setting up function. | ||
1741 | 37 | """ | ||
1742 | 38 | # Default test values | ||
1743 | 39 | self.vals = {'name': 'This is a test function name', | ||
1744 | 40 | 'acronym': 'This is a test function acronym', | ||
1745 | 41 | } | ||
1746 | 42 | super(Base_Test_function, self).setUp() | ||
1747 | 43 | self.vals = dict(self.vals.items() + vals.items()) | ||
1748 | 44 | # Create the function object; we will be testing this, so store in self | ||
1749 | 45 | function_function = self.registry('functions') | ||
1750 | 46 | self.function_id = function_function.create(self.cr, self.uid, self.vals, context=None) | ||
1751 | 47 | |||
1752 | 48 | def test_function(self): | ||
1753 | 49 | """ | ||
1754 | 50 | Checking the function creation. | ||
1755 | 51 | """ | ||
1756 | 52 | function_function = self.registry('functions') | ||
1757 | 53 | function_obj = function_function.browse(self.cr, self.uid, self.function_id, context=None) | ||
1758 | 54 | for field in self.vals: | ||
1759 | 55 | val = function_obj[field] | ||
1760 | 56 | if type(val) == browse_record: | ||
1761 | 57 | self.assertEquals(self.vals[field], val.id, | ||
1762 | 58 | "IDs for %s don't match: (%i != %i)" % | ||
1763 | 59 | (field, self.vals[field], val.id)) | ||
1764 | 60 | else: | ||
1765 | 61 | self.assertEquals(str(self.vals[field]), str(val), | ||
1766 | 62 | "Values for %s don't match: (%s != %s)" % | ||
1767 | 63 | (field, str(self.vals[field]), str(val))) | ||
1768 | 64 | |||
1769 | 65 | |||
1770 | 66 | class Test_function_bad(Base_Test_function): | ||
1771 | 67 | """ | ||
1772 | 68 | Simple test creating a function, test against bad values | ||
1773 | 69 | """ | ||
1774 | 70 | def setUp(self): | ||
1775 | 71 | """ | ||
1776 | 72 | Setting up function, then changing the values to test against. | ||
1777 | 73 | """ | ||
1778 | 74 | super(Test_function_bad, self).setUp() | ||
1779 | 75 | # Change vals to something wrong | ||
1780 | 76 | self.vals = {'name': 'This is the wrong function name', | ||
1781 | 77 | 'acronym': 'This is the wrong function acronym', | ||
1782 | 78 | } | ||
1783 | 79 | |||
1784 | 80 | def test_function(self): | ||
1785 | 81 | """ | ||
1786 | 82 | Checking the function creation, assertions should all be false. | ||
1787 | 83 | """ | ||
1788 | 84 | function_function = self.registry('functions') | ||
1789 | 85 | function_obj = function_function.browse(self.cr, self.uid, self.function_id, context=None) | ||
1790 | 86 | for field in self.vals: | ||
1791 | 87 | val = function_obj[field] | ||
1792 | 88 | if type(val) == browse_record: | ||
1793 | 89 | self.assertNotEqual(self.vals[field], val.id, | ||
1794 | 90 | "IDs for %s don't match: (%i != %i)" % | ||
1795 | 91 | (field, self.vals[field], val.id)) | ||
1796 | 92 | else: | ||
1797 | 93 | self.assertNotEqual(str(self.vals[field]), str(val), | ||
1798 | 94 | "Values for %s don't match: (%s != %s)" % | ||
1799 | 95 | (field, str(self.vals[field]), str(val))) | ||
1800 | 96 | |||
1801 | 97 | |||
1802 | 98 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1803 | 0 | 99 | ||
1804 | === added file 'base_contact_by_functions/tests/test_institutions.py' | |||
1805 | --- base_contact_by_functions/tests/test_institutions.py 1970-01-01 00:00:00 +0000 | |||
1806 | +++ base_contact_by_functions/tests/test_institutions.py 2014-04-30 15:00:54 +0000 | |||
1807 | @@ -0,0 +1,99 @@ | |||
1808 | 1 | # -*- encoding: utf-8 -*- | ||
1809 | 2 | ############################################################################## | ||
1810 | 3 | # | ||
1811 | 4 | # OpenERP, Open Source Management Solution | ||
1812 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1813 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1814 | 7 | # | ||
1815 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1816 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1817 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1818 | 11 | # License, or (at your option) any later version. | ||
1819 | 12 | # | ||
1820 | 13 | # This program is distributed in the hope that it will be useful, | ||
1821 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1822 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1823 | 16 | # GNU Affero General Public License for more details. | ||
1824 | 17 | # | ||
1825 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1826 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1827 | 20 | # | ||
1828 | 21 | ############################################################################## | ||
1829 | 22 | |||
1830 | 23 | from openerp.tests.common import TransactionCase | ||
1831 | 24 | from openerp.osv.orm import browse_record | ||
1832 | 25 | |||
1833 | 26 | |||
1834 | 27 | class Base_Test_institution(TransactionCase): | ||
1835 | 28 | """ | ||
1836 | 29 | Simple test creating a institution | ||
1837 | 30 | This is a base class for institution test cases. | ||
1838 | 31 | Inherit from this and setup values. | ||
1839 | 32 | """ | ||
1840 | 33 | |||
1841 | 34 | def setUp(self, vals={}): | ||
1842 | 35 | """ | ||
1843 | 36 | Setting up institution. | ||
1844 | 37 | """ | ||
1845 | 38 | # Default test values | ||
1846 | 39 | self.vals = {'name': 'This is a test institution name', | ||
1847 | 40 | 'sequence': '1', | ||
1848 | 41 | 'institutionfunction_ids': '[]', | ||
1849 | 42 | } | ||
1850 | 43 | super(Base_Test_institution, self).setUp() | ||
1851 | 44 | self.vals = dict(self.vals.items() + vals.items()) | ||
1852 | 45 | # Create the institution object; we will be testing this, so store in self | ||
1853 | 46 | institution_institution = self.registry('res.institution') | ||
1854 | 47 | self.institution_id = institution_institution.create(self.cr, self.uid, self.vals, context=None) | ||
1855 | 48 | |||
1856 | 49 | def test_institution(self): | ||
1857 | 50 | """ | ||
1858 | 51 | Checking the institution creation. | ||
1859 | 52 | """ | ||
1860 | 53 | institution_institution = self.registry('res.institution') | ||
1861 | 54 | institution_obj = institution_institution.browse(self.cr, self.uid, self.institution_id, context=None) | ||
1862 | 55 | for field in self.vals: | ||
1863 | 56 | val = institution_obj[field] | ||
1864 | 57 | if type(val) == browse_record: | ||
1865 | 58 | self.assertEquals(self.vals[field], val.id, | ||
1866 | 59 | "IDs for %s don't match: (%i != %i)" % | ||
1867 | 60 | (field, self.vals[field], val.id)) | ||
1868 | 61 | else: | ||
1869 | 62 | self.assertEquals(str(self.vals[field]), str(val), | ||
1870 | 63 | "Values for %s don't match: (%s != %s)" % | ||
1871 | 64 | (field, str(self.vals[field]), str(val))) | ||
1872 | 65 | |||
1873 | 66 | |||
1874 | 67 | class Test_institution_bad(Base_Test_institution): | ||
1875 | 68 | """ | ||
1876 | 69 | Simple test creating a institution, test against bad values | ||
1877 | 70 | """ | ||
1878 | 71 | def setUp(self): | ||
1879 | 72 | """ | ||
1880 | 73 | Setting up institution, then changing the values to test against. | ||
1881 | 74 | """ | ||
1882 | 75 | super(Test_institution_bad, self).setUp() | ||
1883 | 76 | # Change vals to something wrong | ||
1884 | 77 | self.vals = {'name': 'This is the wrong institution name', | ||
1885 | 78 | 'sequence': '0', | ||
1886 | 79 | } | ||
1887 | 80 | |||
1888 | 81 | def test_institution(self): | ||
1889 | 82 | """ | ||
1890 | 83 | Checking the institution creation, assertions should all be false. | ||
1891 | 84 | """ | ||
1892 | 85 | institution_institution = self.registry('res.institution') | ||
1893 | 86 | institution_obj = institution_institution.browse(self.cr, self.uid, self.institution_id, context=None) | ||
1894 | 87 | for field in self.vals: | ||
1895 | 88 | val = institution_obj[field] | ||
1896 | 89 | if type(val) == browse_record: | ||
1897 | 90 | self.assertNotEqual(self.vals[field], val.id, | ||
1898 | 91 | "IDs for %s don't match: (%i != %i)" % | ||
1899 | 92 | (field, self.vals[field], val.id)) | ||
1900 | 93 | else: | ||
1901 | 94 | self.assertNotEqual(str(self.vals[field]), str(val), | ||
1902 | 95 | "Values for %s don't match: (%s != %s)" % | ||
1903 | 96 | (field, str(self.vals[field]), str(val))) | ||
1904 | 97 | |||
1905 | 98 | |||
1906 | 99 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1907 | 0 | 100 | ||
1908 | === added file 'base_contact_by_functions/tests/test_partner_category.py' | |||
1909 | --- base_contact_by_functions/tests/test_partner_category.py 1970-01-01 00:00:00 +0000 | |||
1910 | +++ base_contact_by_functions/tests/test_partner_category.py 2014-04-30 15:00:54 +0000 | |||
1911 | @@ -0,0 +1,105 @@ | |||
1912 | 1 | # -*- encoding: utf-8 -*- | ||
1913 | 2 | ############################################################################## | ||
1914 | 3 | # | ||
1915 | 4 | # OpenERP, Open Source Management Solution | ||
1916 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1917 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1918 | 7 | # | ||
1919 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1920 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1921 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1922 | 11 | # License, or (at your option) any later version. | ||
1923 | 12 | # | ||
1924 | 13 | # This program is distributed in the hope that it will be useful, | ||
1925 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1926 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1927 | 16 | # GNU Affero General Public License for more details. | ||
1928 | 17 | # | ||
1929 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1930 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1931 | 20 | # | ||
1932 | 21 | ############################################################################## | ||
1933 | 22 | |||
1934 | 23 | from openerp.tests.common import TransactionCase | ||
1935 | 24 | from openerp.osv.orm import browse_record | ||
1936 | 25 | |||
1937 | 26 | |||
1938 | 27 | class Base_Test_partner_category(TransactionCase): | ||
1939 | 28 | """ | ||
1940 | 29 | Simple test creating a partner_category | ||
1941 | 30 | This is a base class for partner_category test cases. | ||
1942 | 31 | Inherit from this and setup values. | ||
1943 | 32 | """ | ||
1944 | 33 | |||
1945 | 34 | def setUp(self, vals={}): | ||
1946 | 35 | """ | ||
1947 | 36 | Setting up partner_category. | ||
1948 | 37 | """ | ||
1949 | 38 | # Default test values | ||
1950 | 39 | self.vals = {'name': 'This is a test partner_category name', | ||
1951 | 40 | 'active': True, | ||
1952 | 41 | } | ||
1953 | 42 | super(Base_Test_partner_category, self).setUp() | ||
1954 | 43 | # Create the parent | ||
1955 | 44 | partner_category_partner = self.registry('res.partner.category') | ||
1956 | 45 | self.vals['parent_id'] = partner_category_partner.create(self.cr, self.uid, { | ||
1957 | 46 | 'name': 'Test parent', | ||
1958 | 47 | 'active': True, }, context=None) | ||
1959 | 48 | |||
1960 | 49 | self.vals = dict(self.vals.items() + vals.items()) | ||
1961 | 50 | # Create the partner_category object; we will be testing this, so store in self | ||
1962 | 51 | self.partner_category_id = partner_category_partner.create(self.cr, self.uid, self.vals, context=None) | ||
1963 | 52 | |||
1964 | 53 | def test_partner_category(self): | ||
1965 | 54 | """ | ||
1966 | 55 | Checking the partner_category creation. | ||
1967 | 56 | """ | ||
1968 | 57 | partner_category = self.registry('res.partner.category') | ||
1969 | 58 | partner_category_obj = partner_category.browse(self.cr, self.uid, self.partner_category_id, context=None) | ||
1970 | 59 | for field in self.vals: | ||
1971 | 60 | val = partner_category_obj[field] | ||
1972 | 61 | if type(val) == browse_record: | ||
1973 | 62 | self.assertEquals(self.vals[field], val.id, | ||
1974 | 63 | "IDs for %s don't match: (%i != %i)" % | ||
1975 | 64 | (field, self.vals[field], val.id)) | ||
1976 | 65 | else: | ||
1977 | 66 | self.assertEquals(str(self.vals[field]), str(val), | ||
1978 | 67 | "Values for %s don't match: (%s != %s)" % | ||
1979 | 68 | (field, str(self.vals[field]), str(val))) | ||
1980 | 69 | |||
1981 | 70 | |||
1982 | 71 | class Test_partner_category_bad(Base_Test_partner_category): | ||
1983 | 72 | """ | ||
1984 | 73 | Simple test creating a partner_category, test against bad values | ||
1985 | 74 | """ | ||
1986 | 75 | def setUp(self): | ||
1987 | 76 | """ | ||
1988 | 77 | Setting up partner_category, then changing the values to test against. | ||
1989 | 78 | """ | ||
1990 | 79 | super(Test_partner_category_bad, self).setUp() | ||
1991 | 80 | # Change vals to something wrong | ||
1992 | 81 | self.vals = {'name': 'This is the wrong partner_category name', | ||
1993 | 82 | 'active': False, | ||
1994 | 83 | } | ||
1995 | 84 | |||
1996 | 85 | def test_partner_category(self): | ||
1997 | 86 | """ | ||
1998 | 87 | Checking the partner_category creation, assertions should all be false. | ||
1999 | 88 | """ | ||
2000 | 89 | partner_category_partner_category = self.registry('res.partner.category') | ||
2001 | 90 | partner_category_obj = partner_category_partner_category.browse(self.cr, self.uid, | ||
2002 | 91 | self.partner_category_id, | ||
2003 | 92 | context=None) | ||
2004 | 93 | for field in self.vals: | ||
2005 | 94 | val = partner_category_obj[field] | ||
2006 | 95 | if type(val) == browse_record: | ||
2007 | 96 | self.assertNotEqual(self.vals[field], val.id, | ||
2008 | 97 | "IDs for %s don't match: (%i != %i)" % | ||
2009 | 98 | (field, self.vals[field], val.id)) | ||
2010 | 99 | else: | ||
2011 | 100 | self.assertNotEqual(str(self.vals[field]), str(val), | ||
2012 | 101 | "Values for %s don't match: (%s != %s)" % | ||
2013 | 102 | (field, str(self.vals[field]), str(val))) | ||
2014 | 103 | |||
2015 | 104 | |||
2016 | 105 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2017 | 0 | 106 | ||
2018 | === added directory 'base_contact_by_functions_partner_firstname' | |||
2019 | === added file 'base_contact_by_functions_partner_firstname/__init__.py' | |||
2020 | --- base_contact_by_functions_partner_firstname/__init__.py 1970-01-01 00:00:00 +0000 | |||
2021 | +++ base_contact_by_functions_partner_firstname/__init__.py 2014-04-30 15:00:54 +0000 | |||
2022 | @@ -0,0 +1,25 @@ | |||
2023 | 1 | # -*- encoding: utf-8 -*- | ||
2024 | 2 | ############################################################################## | ||
2025 | 3 | # | ||
2026 | 4 | # OpenERP, Open Source Management Solution | ||
2027 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
2028 | 6 | # (<http://www.savoirfairelinux.com>). | ||
2029 | 7 | # | ||
2030 | 8 | # This program is free software: you can redistribute it and/or modify | ||
2031 | 9 | # it under the terms of the GNU Affero General Public License as | ||
2032 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
2033 | 11 | # License, or (at your option) any later version. | ||
2034 | 12 | # | ||
2035 | 13 | # This program is distributed in the hope that it will be useful, | ||
2036 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2037 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2038 | 16 | # GNU Affero General Public License for more details. | ||
2039 | 17 | # | ||
2040 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
2041 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2042 | 20 | # | ||
2043 | 21 | ############################################################################## | ||
2044 | 22 | |||
2045 | 23 | import res_partner | ||
2046 | 24 | |||
2047 | 25 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2048 | 0 | 26 | ||
2049 | === added file 'base_contact_by_functions_partner_firstname/__openerp__.py' | |||
2050 | --- base_contact_by_functions_partner_firstname/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
2051 | +++ base_contact_by_functions_partner_firstname/__openerp__.py 2014-04-30 15:00:54 +0000 | |||
2052 | @@ -0,0 +1,53 @@ | |||
2053 | 1 | # -*- encoding: utf-8 -*- | ||
2054 | 2 | ############################################################################## | ||
2055 | 3 | # | ||
2056 | 4 | # OpenERP, Open Source Management Solution | ||
2057 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
2058 | 6 | # (<http://www.savoirfairelinux.com>). | ||
2059 | 7 | # | ||
2060 | 8 | # This program is free software: you can redistribute it and/or modify | ||
2061 | 9 | # it under the terms of the GNU Affero General Public License as | ||
2062 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
2063 | 11 | # License, or (at your option) any later version. | ||
2064 | 12 | # | ||
2065 | 13 | # This program is distributed in the hope that it will be useful, | ||
2066 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2067 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2068 | 16 | # GNU Affero General Public License for more details. | ||
2069 | 17 | # | ||
2070 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
2071 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2072 | 20 | # | ||
2073 | 21 | ############################################################################## | ||
2074 | 22 | |||
2075 | 23 | { | ||
2076 | 24 | 'name': 'Contacts by Functions - Partner Firstname Bindings', | ||
2077 | 25 | 'version': '0.1', | ||
2078 | 26 | 'category': 'Customer Relationship Management', | ||
2079 | 27 | 'summary': 'Contacts by Functions - Partner Firstname Bindings', | ||
2080 | 28 | 'description': """ | ||
2081 | 29 | Contacts by Functions - Partner Firstname Bindings | ||
2082 | 30 | ================================================== | ||
2083 | 31 | |||
2084 | 32 | Contributors | ||
2085 | 33 | ------------ | ||
2086 | 34 | * El Hadji Dem (elhadji.dem@savoirfairelinux.com) | ||
2087 | 35 | """, | ||
2088 | 36 | 'author': 'Savoir-faire Linux', | ||
2089 | 37 | 'website': 'www.savoirfairelinux.com', | ||
2090 | 38 | 'license': 'AGPL-3', | ||
2091 | 39 | 'depends': [ | ||
2092 | 40 | 'base_contact_by_functions', | ||
2093 | 41 | 'partner_firstname', | ||
2094 | 42 | ], | ||
2095 | 43 | 'data': [ | ||
2096 | 44 | 'res_partner_view.xml', | ||
2097 | 45 | ], | ||
2098 | 46 | 'test': [], | ||
2099 | 47 | 'demo': [ | ||
2100 | 48 | ], | ||
2101 | 49 | 'installable': True, | ||
2102 | 50 | 'auto_install': True, | ||
2103 | 51 | } | ||
2104 | 52 | |||
2105 | 53 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2106 | 0 | 54 | ||
2107 | === added directory 'base_contact_by_functions_partner_firstname/i18n' | |||
2108 | === added file 'base_contact_by_functions_partner_firstname/i18n/base_contact_by_functions_partner_firstname.pot' | |||
2109 | --- base_contact_by_functions_partner_firstname/i18n/base_contact_by_functions_partner_firstname.pot 1970-01-01 00:00:00 +0000 | |||
2110 | +++ base_contact_by_functions_partner_firstname/i18n/base_contact_by_functions_partner_firstname.pot 2014-04-30 15:00:54 +0000 | |||
2111 | @@ -0,0 +1,27 @@ | |||
2112 | 1 | # Translation of OpenERP Server. | ||
2113 | 2 | # This file contains the translation of the following modules: | ||
2114 | 3 | # * base_contact_by_functions_partner_firstname | ||
2115 | 4 | # | ||
2116 | 5 | msgid "" | ||
2117 | 6 | msgstr "" | ||
2118 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
2119 | 8 | "Report-Msgid-Bugs-To: \n" | ||
2120 | 9 | "POT-Creation-Date: 2014-01-03 07:16+0000\n" | ||
2121 | 10 | "PO-Revision-Date: 2014-01-03 02:17-0500\n" | ||
2122 | 11 | "Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n" | ||
2123 | 12 | "Language-Team: \n" | ||
2124 | 13 | "MIME-Version: 1.0\n" | ||
2125 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
2126 | 15 | "Content-Transfer-Encoding: 8bit\n" | ||
2127 | 16 | "Plural-Forms: \n" | ||
2128 | 17 | "X-Generator: Poedit 1.5.4\n" | ||
2129 | 18 | |||
2130 | 19 | #. module: base_contact_by_functions_partner_firstname | ||
2131 | 20 | #: view:res.partner:0 | ||
2132 | 21 | msgid "lastname" | ||
2133 | 22 | msgstr "" | ||
2134 | 23 | |||
2135 | 24 | #. module: base_contact_by_functions_partner_firstname | ||
2136 | 25 | #: view:res.partner:0 | ||
2137 | 26 | msgid "Firstname" | ||
2138 | 27 | msgstr "" | ||
2139 | 0 | 28 | ||
2140 | === added file 'base_contact_by_functions_partner_firstname/i18n/fr.po' | |||
2141 | --- base_contact_by_functions_partner_firstname/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
2142 | +++ base_contact_by_functions_partner_firstname/i18n/fr.po 2014-04-30 15:00:54 +0000 | |||
2143 | @@ -0,0 +1,27 @@ | |||
2144 | 1 | # Translation of OpenERP Server. | ||
2145 | 2 | # This file contains the translation of the following modules: | ||
2146 | 3 | # * base_contact_by_functions_partner_firstname | ||
2147 | 4 | # | ||
2148 | 5 | msgid "" | ||
2149 | 6 | msgstr "" | ||
2150 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
2151 | 8 | "Report-Msgid-Bugs-To: \n" | ||
2152 | 9 | "POT-Creation-Date: 2014-01-03 07:17+0000\n" | ||
2153 | 10 | "PO-Revision-Date: 2014-01-03 02:18-0500\n" | ||
2154 | 11 | "Last-Translator: EL Hadji DEM <elhadji.dem@savoirfairelinux.com>\n" | ||
2155 | 12 | "Language-Team: \n" | ||
2156 | 13 | "MIME-Version: 1.0\n" | ||
2157 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
2158 | 15 | "Content-Transfer-Encoding: 8bit\n" | ||
2159 | 16 | "Plural-Forms: \n" | ||
2160 | 17 | "X-Generator: Poedit 1.5.4\n" | ||
2161 | 18 | |||
2162 | 19 | #. module: base_contact_by_functions_partner_firstname | ||
2163 | 20 | #: view:res.partner:0 | ||
2164 | 21 | msgid "lastname" | ||
2165 | 22 | msgstr "Nom" | ||
2166 | 23 | |||
2167 | 24 | #. module: base_contact_by_functions_partner_firstname | ||
2168 | 25 | #: view:res.partner:0 | ||
2169 | 26 | msgid "Firstname" | ||
2170 | 27 | msgstr "Prénom" | ||
2171 | 0 | 28 | ||
2172 | === added file 'base_contact_by_functions_partner_firstname/res_partner.py' | |||
2173 | --- base_contact_by_functions_partner_firstname/res_partner.py 1970-01-01 00:00:00 +0000 | |||
2174 | +++ base_contact_by_functions_partner_firstname/res_partner.py 2014-04-30 15:00:54 +0000 | |||
2175 | @@ -0,0 +1,76 @@ | |||
2176 | 1 | # -*- encoding: utf-8 -*- | ||
2177 | 2 | ############################################################################## | ||
2178 | 3 | # | ||
2179 | 4 | # OpenERP, Open Source Management Solution | ||
2180 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
2181 | 6 | # (<http://www.savoirfairelinux.com>). | ||
2182 | 7 | # | ||
2183 | 8 | # This program is free software: you can redistribute it and/or modify | ||
2184 | 9 | # it under the terms of the GNU Affero General Public License as | ||
2185 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
2186 | 11 | # License, or (at your option) any later version. | ||
2187 | 12 | # | ||
2188 | 13 | # This program is distributed in the hope that it will be useful, | ||
2189 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2190 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2191 | 16 | # GNU Affero General Public License for more details. | ||
2192 | 17 | # | ||
2193 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
2194 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2195 | 20 | # | ||
2196 | 21 | ############################################################################## | ||
2197 | 22 | |||
2198 | 23 | import time | ||
2199 | 24 | from openerp.osv import orm, fields | ||
2200 | 25 | |||
2201 | 26 | |||
2202 | 27 | class res_partner(orm.Model): | ||
2203 | 28 | """ | ||
2204 | 29 | Inherits partner and adds functions_ids : List of functions | ||
2205 | 30 | """ | ||
2206 | 31 | _inherit = 'res.partner' | ||
2207 | 32 | |||
2208 | 33 | def create(self, cr, user, vals, context=None): | ||
2209 | 34 | context = self._basecontact_check_context(cr, user, 'create', context) | ||
2210 | 35 | if not vals.get('name') and vals.get('contact_id'): | ||
2211 | 36 | vals['name'] = self.browse(cr, user, vals['contact_id'], context=context).name | ||
2212 | 37 | if vals.get('end_date'): | ||
2213 | 38 | if vals['end_date'] and vals['end_date'] <= time.strftime('%Y-%m-%d'): | ||
2214 | 39 | vals['active'] = False | ||
2215 | 40 | if vals.get('contact_type') and vals.get('contact_type') == 'standalone': | ||
2216 | 41 | contact_vals = {key: vals[key] for key in vals.keys() if key != 'parent_id'} | ||
2217 | 42 | contact_vals['active'] = True | ||
2218 | 43 | contact_vals['function_id'] = None | ||
2219 | 44 | vals['contact_id'] = super(res_partner, self).create(cr, user, contact_vals, | ||
2220 | 45 | context=context) | ||
2221 | 46 | self.write(cr, user, vals['contact_id'], { | ||
2222 | 47 | 'firstname': vals.get('firstname', ''), | ||
2223 | 48 | 'lastname': vals.get('lastname', ''), | ||
2224 | 49 | }, context=context) | ||
2225 | 50 | # Check if we create existing contact from company(ie: company is true) | ||
2226 | 51 | # Check if we create another function from contact view | ||
2227 | 52 | if vals.get('contact_type') == 'attached' or (not vals.get('contact_type') and vals.get('contact_id')): | ||
2228 | 53 | contact_info = self.browse(cr, user, vals.get('contact_id'), context=context) | ||
2229 | 54 | vals['firstname'] = contact_info.firstname | ||
2230 | 55 | vals['title'] = contact_info.title.id or '' | ||
2231 | 56 | |||
2232 | 57 | if ('contact_id'in vals and ('reset_password' in context or | ||
2233 | 58 | 'install_mode' in context)): | ||
2234 | 59 | return vals['contact_id'] | ||
2235 | 60 | res = super(res_partner, self).create(cr, user, vals, context=context) | ||
2236 | 61 | return res | ||
2237 | 62 | |||
2238 | 63 | def write(self, cr, user, ids, vals, context=None): | ||
2239 | 64 | context = self._basecontact_check_context(cr, user, 'write', context) | ||
2240 | 65 | if vals.get('end_date'): | ||
2241 | 66 | if vals['end_date'] and vals['end_date'] <= time.strftime('%Y-%m-%d'): | ||
2242 | 67 | vals['active'] = False | ||
2243 | 68 | if vals.get('contact_type') and vals.get('contact_type') == 'standalone': | ||
2244 | 69 | contact_vals = {key: vals[key] for key in vals.keys() if key != 'parent_id'} | ||
2245 | 70 | contact_vals['active'] = True | ||
2246 | 71 | contact_vals['function_id'] = None | ||
2247 | 72 | vals['contact_id'] = super(res_partner, self).write(cr, user, contact_vals, | ||
2248 | 73 | context=context) | ||
2249 | 74 | return super(res_partner, self).write(cr, user, ids, vals, context=context) | ||
2250 | 75 | |||
2251 | 76 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2252 | 0 | 77 | ||
2253 | === added file 'base_contact_by_functions_partner_firstname/res_partner_view.xml' | |||
2254 | --- base_contact_by_functions_partner_firstname/res_partner_view.xml 1970-01-01 00:00:00 +0000 | |||
2255 | +++ base_contact_by_functions_partner_firstname/res_partner_view.xml 2014-04-30 15:00:54 +0000 | |||
2256 | @@ -0,0 +1,71 @@ | |||
2257 | 1 | <?xml version = "1.0" encoding="utf-8"?> | ||
2258 | 2 | <openerp> | ||
2259 | 3 | <data> | ||
2260 | 4 | |||
2261 | 5 | <!--Redefine this part of view from firstname_partner module --> | ||
2262 | 6 | <record id="view_partner_form_firstname_inherit11" model="ir.ui.view"> | ||
2263 | 7 | <field name="name">res.partner.form.firstname.inherit11</field> | ||
2264 | 8 | <field name="model">res.partner</field> | ||
2265 | 9 | <field name="inherit_id" ref="partner_firstname.view_partner_form_firstname"/> | ||
2266 | 10 | <field name="arch" type="xml"> | ||
2267 | 11 | <!--Redefine firstname field in view partner--> | ||
2268 | 12 | <field name="firstname" position="replace"> | ||
2269 | 13 | <group attrs="{'invisible': [('is_company', '=', True)]}"> | ||
2270 | 14 | <field name="firstname"/> | ||
2271 | 15 | </group> | ||
2272 | 16 | </field> | ||
2273 | 17 | <!--Redefine firstname field in contact view--> | ||
2274 | 18 | <xpath expr="//form[@string='Contact']/sheet/div//field[@name='firstname']" position="replace"> | ||
2275 | 19 | <field name="firstname" attrs="{'invisible': [('contact_type', '=', 'attached')]}"/> | ||
2276 | 20 | </xpath> | ||
2277 | 21 | </field> | ||
2278 | 22 | </record> | ||
2279 | 23 | |||
2280 | 24 | <!--Replace name by full name in kanban view--> | ||
2281 | 25 | <record id="view_partner_form_firstname_inherit11" model="ir.ui.view"> | ||
2282 | 26 | <field name="model">res.partner</field> | ||
2283 | 27 | <field name="inherit_id" ref="base_contact_by_functions.view_contact_by_function_form"/> | ||
2284 | 28 | <field name="arch" type="xml"> | ||
2285 | 29 | <xpath expr="//field[@name='other_contact_history_ids']/kanban//field[@name='name']" position="replace"> | ||
2286 | 30 | <field name="lastname"/> | ||
2287 | 31 | </xpath> | ||
2288 | 32 | <xpath expr="//field[@name='other_contact_history_ids']/kanban/templates//t[@t-name='kanban-box']//div[@class='oe_kanban_details']//field[@name='name']" | ||
2289 | 33 | position="before"> | ||
2290 | 34 | <field name="firstname"/> | ||
2291 | 35 | </xpath> | ||
2292 | 36 | <!--Display firstname and name after Image--> | ||
2293 | 37 | <xpath expr="//field[@name='other_contact_history_ids']/form[@string='Contact']/sheet//field[@name='image']" | ||
2294 | 38 | position="after"> | ||
2295 | 39 | <h1> | ||
2296 | 40 | <field name="contact_id" style="width: 70%%" readonly="1"/> | ||
2297 | 41 | </h1> | ||
2298 | 42 | </xpath> | ||
2299 | 43 | </field> | ||
2300 | 44 | </record> | ||
2301 | 45 | |||
2302 | 46 | <!--Display firstname and name in kanban view for other position --> | ||
2303 | 47 | <record id="view_partner_form_firstname_name" model="ir.ui.view"> | ||
2304 | 48 | <field name="name">res.partner.form.firstname.name</field> | ||
2305 | 49 | <field name="model">res.partner</field> | ||
2306 | 50 | <field name="inherit_id" ref="base_contact_by_functions.view_position_info_form"/> | ||
2307 | 51 | <field name="arch" type="xml"> | ||
2308 | 52 | <xpath expr="//field[@name='other_contact_ids']/form[@string='Contact']/sheet/div//field[@name='name']" | ||
2309 | 53 | position="replace"/> | ||
2310 | 54 | <xpath expr="//field[@name='other_contact_ids']/form[@string='Contact']/sheet//field[@name='image']" | ||
2311 | 55 | position="after"> | ||
2312 | 56 | <h1> | ||
2313 | 57 | <field name="contact_id" style="width: 70%%" readonly="1"/> | ||
2314 | 58 | </h1> | ||
2315 | 59 | </xpath> | ||
2316 | 60 | <!--I don't want to display the label field, so I hide it--> | ||
2317 | 61 | <xpath expr="//field[@name='other_contact_ids']/form[@string='Contact']/sheet/div//label[@for='name']" | ||
2318 | 62 | position="replace"/> | ||
2319 | 63 | <!--Add firstname before name in templates view--> | ||
2320 | 64 | <xpath expr="//t[@t-name='kanban-box']//div[@class='oe_kanban_details']/h4[@class='oe_partner_heading']//field[@name='name']" | ||
2321 | 65 | position="before"> | ||
2322 | 66 | <field name="firstname"/> | ||
2323 | 67 | </xpath> | ||
2324 | 68 | </field> | ||
2325 | 69 | </record> | ||
2326 | 70 | </data> | ||
2327 | 71 | </openerp> | ||
2328 | 0 | 72 | ||
2329 | === added directory 'base_contact_by_functions_partner_firstname/tests' | |||
2330 | === added file 'base_contact_by_functions_partner_firstname/tests/__init__.py' | |||
2331 | --- base_contact_by_functions_partner_firstname/tests/__init__.py 1970-01-01 00:00:00 +0000 | |||
2332 | +++ base_contact_by_functions_partner_firstname/tests/__init__.py 2014-04-30 15:00:54 +0000 | |||
2333 | @@ -0,0 +1,27 @@ | |||
2334 | 1 | # -*- encoding: utf-8 -*- | ||
2335 | 2 | ############################################################################## | ||
2336 | 3 | # | ||
2337 | 4 | # OpenERP, Open Source Management Solution | ||
2338 | 5 | # This module copyright (C) 2010 - 2014 Savoir-faire Linux | ||
2339 | 6 | # (<http://www.savoirfairelinux.com>). | ||
2340 | 7 | # | ||
2341 | 8 | # This program is free software: you can redistribute it and/or modify | ||
2342 | 9 | # it under the terms of the GNU Affero General Public License as | ||
2343 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
2344 | 11 | # License, or (at your option) any later version. | ||
2345 | 12 | # | ||
2346 | 13 | # This program is distributed in the hope that it will be useful, | ||
2347 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2348 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2349 | 16 | # GNU Affero General Public License for more details. | ||
2350 | 17 | # | ||
2351 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
2352 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2353 | 20 | # | ||
2354 | 21 | ############################################################################## | ||
2355 | 22 | |||
2356 | 23 | from . import test_partner | ||
2357 | 24 | |||
2358 | 25 | checks = [ | ||
2359 | 26 | test_partner, | ||
2360 | 27 | ] | ||
2361 | 0 | 28 | ||
2362 | === added file 'base_contact_by_functions_partner_firstname/tests/test_partner.py' | |||
2363 | --- base_contact_by_functions_partner_firstname/tests/test_partner.py 1970-01-01 00:00:00 +0000 | |||
2364 | +++ base_contact_by_functions_partner_firstname/tests/test_partner.py 2014-04-30 15:00:54 +0000 | |||
2365 | @@ -0,0 +1,51 @@ | |||
2366 | 1 | # -*- encoding: utf-8 -*- | ||
2367 | 2 | ############################################################################## | ||
2368 | 3 | # | ||
2369 | 4 | # OpenERP, Open Source Management Solution | ||
2370 | 5 | # This module copyright (C) 2010 - 2014 Savoir-faire Linux | ||
2371 | 6 | # (<http://www.savoirfairelinux.com>). | ||
2372 | 7 | # | ||
2373 | 8 | # This program is free software: you can redistribute it and/or modify | ||
2374 | 9 | # it under the terms of the GNU Affero General Public License as | ||
2375 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
2376 | 11 | # License, or (at your option) any later version. | ||
2377 | 12 | # | ||
2378 | 13 | # This program is distributed in the hope that it will be useful, | ||
2379 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2380 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2381 | 16 | # GNU Affero General Public License for more details. | ||
2382 | 17 | # | ||
2383 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
2384 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2385 | 20 | # | ||
2386 | 21 | ############################################################################## | ||
2387 | 22 | |||
2388 | 23 | from openerp.tests.common import TransactionCase | ||
2389 | 24 | |||
2390 | 25 | |||
2391 | 26 | class test_partner_contact_id(TransactionCase): | ||
2392 | 27 | |||
2393 | 28 | def setUp(self): | ||
2394 | 29 | super(test_partner_contact_id, self).setUp() | ||
2395 | 30 | # Clean up registries | ||
2396 | 31 | self.registry('ir.model').clear_caches() | ||
2397 | 32 | self.registry('ir.model.data').clear_caches() | ||
2398 | 33 | # Get registries | ||
2399 | 34 | self.user_model = self.registry("res.users") | ||
2400 | 35 | self.partner_model = self.registry("res.partner") | ||
2401 | 36 | # Get context | ||
2402 | 37 | self.context = self.user_model.context_get(self.cr, self.uid) | ||
2403 | 38 | # Create values for test, contact also created | ||
2404 | 39 | contact_id = self.partner_model.create(self.cr, self.uid, { | ||
2405 | 40 | 'name': 'test_contact', | ||
2406 | 41 | 'title': 1, | ||
2407 | 42 | }, context=self.context) | ||
2408 | 43 | self.vals = { | ||
2409 | 44 | 'name': 'test_partner', | ||
2410 | 45 | 'type': 'contact', | ||
2411 | 46 | 'contact_id': contact_id, | ||
2412 | 47 | } | ||
2413 | 48 | |||
2414 | 49 | def test_create_partner(self): | ||
2415 | 50 | cr, uid, vals, context = self.cr, self.uid, self.vals, self.context | ||
2416 | 51 | self.partner_model.create(cr, uid, vals, context=context) |
I have a hard time trying to find out what this module actually does. The manifest description is very terse. The name of the module reminds me of base_contact, which allowed multiple connections between the same person and a company. Is this module similar? The description should at least explain what 'institutions' are (a concept that this module introduces).
Terminology is off at times, it seems. l.130: 'acronym': is this abbreviation, or maybe stick to the standard 'code' field name and label?
Organism: I'm guessing you mean organization. But in any case, changing the 'company' terminology should be split off as a separate module.
The translations seem to contain obsolete terms, e.g. l.241 and other occurrences of 'passport'.