· 9 years ago · Nov 23, 2016, 03:52 PM
1out instantiating them).
2 | If the automatic discovery is not needed, it is possible to set the model's
3 | ``_register`` attribute to False.
4 |
5 | _custom = False
6 |
7 | _date_name = 'date'
8 |
9 | _group_by_full = {}
10 |
11 | _needaction = False
12 |
13 | _parent_name = 'parent_id'
14 |
15 | _parent_order = False
16 |
17 | _parent_store = False
18 |
19 | _translate = True
20 |
21 | ----------------------------------------------------------------------
22 | Methods inherited from openerp.addons.base.res.res_partner.format_address:
23 |
24 | fields_view_get_address(self, *args, **kwargs)
25
26None
272016-11-23 15:49:23,746 22457 DEBUG ? openerp.service.server: cron1 polling for jobs
282016-11-23 15:49:23,747 22457 DEBUG ? openerp.service.server: cron1 polling for jobs
292016-11-23 15:49:23,760 22457 DEBUG work4people openerp.addons.base.ir.ir_cron: Starting job `Run Event Reminder`.
302016-11-23 15:49:23,760 22457 DEBUG work4people openerp.addons.base.ir.ir_cron: Another process/thread is already busy executing job `Run Event Reminder`, skipping it.
312016-11-23 15:49:23,782 22457 DEBUG work4people openerp.addons.base.ir.ir_cron: Starting job `Fetchmail Service`.
322016-11-23 15:49:24,213 22457 INFO work4people werkzeug: 127.0.0.1 - - [23/Nov/2016 15:49:24] "GET /web/?debug HTTP/1.0" 200 -
332016-11-23 15:49:24,231 22457 DEBUG work4people openerp.addons.base.ir.ir_cron: cron.object.execute(u'work4people', 1, '*', u'calendar.alarm_manager', u'get_next_mail')
342016-11-23 15:49:24,232 22457 DEBUG work4people openerp.addons.base.ir.ir_cron: cron.object.execute(u'work4people', 1, '*', u'fetchmail.server', u'_fetch_mails')
352016-11-23 15:49:24,245 22457 INFO work4people openerp.addons.fetchmail.fetchmail: start checking for new emails on imap server Catchall Postfach
362016-11-23 15:49:24,508 22457 INFO work4people openerp.addons.fetchmail.fetchmail: Fetched 0 email(s) on imap server Catchall Postfach; 0 succeeded, 0 failed.
372016-11-23 15:49:24,513 22457 INFO ? werkzeug: 127.0.0.1 - - [23/Nov/2016 15:49:24] "GET /web_editor/static/src/css/web_editor.css HTTP/1.0" 200 -
382016-11-23 15:49:24,515 22457 INFO ? werkzeug: 127.0.0.1 - - [23/Nov/2016 15:49:24] "GET /rating/static/src/css/rating_common.css HTTP/1.0" 200 -
392016-11-23 15:49:24,540 22457 INFO ? werkzeug: 127.0.0.1 - - [23/Nov/2016 15:49:24] "GET /base/static/src/css/modules.css HTTP/1.0" 200 -
402016-11-23 15:49:24,603 22457 INFO ? werkzeug: 127.0.0.1 - - [23/Nov/2016 15:49:24] "GET /plustron_reports_w4p/static/src/css/document.css HTTP/1.0" 200 -
412016-11-23 15:49:24,631 22457 INFO ? werkzeug: 127.0.0.1 - - [23/Nov/2016 15:49:24] "GET /plustron_reports_w4p/static/src/css/plustron_base.css HTTP/1.0" 200 -
42Help on res.partner in module openerp.api object:
43
44class res.partner(openerp.addons.plustron_multi_shop.models.res_partner.PlustronResPartner, openerp.addons.website_sale.models.sale_order.res_partner, openerp.addons.plustron_clients.models.plustron_clients.PlustronResPartner, openerp.addons.delivery.models.partner.ResPartner, openerp.addons.project_timesheet.project_timesheet.res_partner, openerp.addons.project_issue.project_issue.res_partner, openerp.addons.live_crm.crm.ResPartner, openerp.addons.crm_phone.crm_phone.ResPartner, openerp.addons.crm_claim.crm_claim.res_partner, openerp.addons.stock.partner.res_partner, openerp.addons.sale.res_partner.res_partner, openerp.addons.project.res_partner.res_partner, openerp.addons.payment.models.res_partner.res_partner, openerp.addons.crm.base_partner_merge.ResPartner, openerp.addons.crm.res_partner.res_partner, openerp.addons.base_vat.base_vat.res_partner, openerp.addons.calendar.calendar.res_partner, openerp.addons.account.models.partner.ResPartner, openerp.addons.sales_team.sales_team.res_partner, openerp.addons.product.partner.res_partner, openerp.addons.hr.res_partner.Partner, openerp.addons.auth_signup.res_users.res_partner, openerp.addons.website_partner.models.res_partner.WebsiteResPartner, openerp.addons.mail.models.res_partner.Partner, openerp.addons.website.models.website.res_partner, openerp.addons.bus.models.res_partner.ResPartner, openerp.addons.base_phone.models.res_partner.ResPartner, openerp.addons.partner_firstname.models.ResPartner, openerp.addons.base.res.res_partner.res_partner, openerp.addons.website.models.website.website_seo_metadata, openerp.addons.mail.models.mail_thread.MailThread, openerp.addons.website.models.website.website_published_mixin, openerp.addons.web_live.abstract.AbstractLive)
45 | Method resolution order:
46 | res.partner
47 | openerp.addons.plustron_multi_shop.models.res_partner.PlustronResPartner
48 | openerp.addons.website_sale.models.sale_order.res_partner
49 | openerp.addons.plustron_clients.models.plustron_clients.PlustronResPartner
50 | openerp.addons.delivery.models.partner.ResPartner
51 | openerp.addons.project_timesheet.project_timesheet.res_partner
52 | openerp.addons.project_issue.project_issue.res_partner
53 | openerp.addons.live_crm.crm.ResPartner
54 | openerp.addons.crm_phone.crm_phone.ResPartner
55 | openerp.addons.crm_claim.crm_claim.res_partner
56 | openerp.addons.stock.partner.res_partner
57 | openerp.addons.sale.res_partner.res_partner
58 | openerp.addons.project.res_partner.res_partner
59 | openerp.addons.payment.models.res_partner.res_partner
60 | openerp.addons.crm.base_partner_merge.ResPartner
61 | openerp.addons.crm.res_partner.res_partner
62 | openerp.addons.base_vat.base_vat.res_partner
63 | openerp.addons.calendar.calendar.res_partner
64 | openerp.addons.account.models.partner.ResPartner
65 | openerp.addons.sales_team.sales_team.res_partner
66 | openerp.addons.product.partner.res_partner
67 | openerp.addons.hr.res_partner.Partner
68 | openerp.addons.auth_signup.res_users.res_partner
69 | openerp.addons.website_partner.models.res_partner.WebsiteResPartner
70 | openerp.addons.mail.models.res_partner.Partner
71 | openerp.addons.website.models.website.res_partner
72 | openerp.addons.bus.models.res_partner.ResPartner
73 | openerp.addons.base_phone.models.res_partner.ResPartner
74 | openerp.addons.partner_firstname.models.ResPartner
75 | openerp.addons.base.res.res_partner.res_partner
76 | openerp.addons.website.models.website.website_seo_metadata
77 | openerp.models.Model
78 | openerp.addons.mail.models.mail_thread.MailThread
79 | openerp.addons.website.models.website.website_published_mixin
80 | openerp.addons.web_live.abstract.AbstractLive
81 | openerp.models.AbstractModel
82 | openerp.models.BaseModel
83 | openerp.addons.base.res.res_partner.format_address
84 | __builtin__.object
85 |
86 | Data descriptors defined here:
87 |
88 | __last_update
89 |
90 | active
91 |
92 | afs_news
93 |
94 | bank_account_count
95 |
96 | bank_ids
97 | One2many field; the value of such a field is the recordset of all the
98 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
99 | the current record.
100 |
101 | :param comodel_name: name of the target model (string)
102 |
103 | :param inverse_name: name of the inverse ``Many2one`` field in
104 | ``comodel_name`` (string)
105 |
106 | :param domain: an optional domain to set on candidate values on the
107 | client side (domain or string)
108 |
109 | :param context: an optional context to use on the client side when
110 | handling that field (dictionary)
111 |
112 | :param auto_join: whether JOINs are generated upon search through that
113 | field (boolean, by default ``False``)
114 |
115 | :param limit: optional limit to use upon read (integer)
116 |
117 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
118 | the case of related fields or field extensions.
119 |
120 | barcode
121 | Basic string field, can be length-limited, usually displayed as a
122 | single-line string in clients.
123 |
124 | :param int size: the maximum size of values stored for that field
125 |
126 | :param translate: enable the translation of the field's values; use
127 | ``translate=True`` to translate field values as a whole; ``translate``
128 | may also be a callable such that ``translate(callback, value)``
129 | translates ``value`` by using ``callback(term)`` to retrieve the
130 | translation of terms.
131 |
132 | birthdate
133 | Basic string field, can be length-limited, usually displayed as a
134 | single-line string in clients.
135 |
136 | :param int size: the maximum size of values stored for that field
137 |
138 | :param translate: enable the translation of the field's values; use
139 | ``translate=True`` to translate field values as a whole; ``translate``
140 | may also be a callable such that ``translate(callback, value)``
141 | translates ``value`` by using ``callback(term)`` to retrieve the
142 | translation of terms.
143 |
144 | birthday
145 |
146 | calendar_last_notif_ack
147 |
148 | category_id
149 | Many2many field; the value of such a field is the recordset.
150 |
151 | :param comodel_name: name of the target model (string)
152 |
153 | The attribute ``comodel_name`` is mandatory except in the case of related
154 | fields or field extensions.
155 |
156 | :param relation: optional name of the table that stores the relation in
157 | the database (string)
158 |
159 | :param column1: optional name of the column referring to "these" records
160 | in the table ``relation`` (string)
161 |
162 | :param column2: optional name of the column referring to "those" records
163 | in the table ``relation`` (string)
164 |
165 | The attributes ``relation``, ``column1`` and ``column2`` are optional. If not
166 | given, names are automatically generated from model names, provided
167 | ``model_name`` and ``comodel_name`` are different!
168 |
169 | :param domain: an optional domain to set on candidate values on the
170 | client side (domain or string)
171 |
172 | :param context: an optional context to use on the client side when
173 | handling that field (dictionary)
174 |
175 | :param limit: optional limit to use upon read (integer)
176 |
177 | channel_ids
178 | Many2many field; the value of such a field is the recordset.
179 |
180 | :param comodel_name: name of the target model (string)
181 |
182 | The attribute ``comodel_name`` is mandatory except in the case of related
183 | fields or field extensions.
184 |
185 | :param relation: optional name of the table that stores the relation in
186 | the database (string)
187 |
188 | :param column1: optional name of the column referring to "these" records
189 | in the table ``relation`` (string)
190 |
191 | :param column2: optional name of the column referring to "those" records
192 | in the table ``relation`` (string)
193 |
194 | The attributes ``relation``, ``column1`` and ``column2`` are optional. If not
195 | given, names are automatically generated from model names, provided
196 | ``model_name`` and ``comodel_name`` are different!
197 |
198 | :param domain: an optional domain to set on candidate values on the
199 | client side (domain or string)
200 |
201 | :param context: an optional context to use on the client side when
202 | handling that field (dictionary)
203 |
204 | :param limit: optional limit to use upon read (integer)
205 |
206 | child_ids
207 | One2many field; the value of such a field is the recordset of all the
208 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
209 | the current record.
210 |
211 | :param comodel_name: name of the target model (string)
212 |
213 | :param inverse_name: name of the inverse ``Many2one`` field in
214 | ``comodel_name`` (string)
215 |
216 | :param domain: an optional domain to set on candidate values on the
217 | client side (domain or string)
218 |
219 | :param context: an optional context to use on the client side when
220 | handling that field (dictionary)
221 |
222 | :param auto_join: whether JOINs are generated upon search through that
223 | field (boolean, by default ``False``)
224 |
225 | :param limit: optional limit to use upon read (integer)
226 |
227 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
228 | the case of related fields or field extensions.
229 |
230 | city
231 | Basic string field, can be length-limited, usually displayed as a
232 | single-line string in clients.
233 |
234 | :param int size: the maximum size of values stored for that field
235 |
236 | :param translate: enable the translation of the field's values; use
237 | ``translate=True`` to translate field values as a whole; ``translate``
238 | may also be a callable such that ``translate(callback, value)``
239 | translates ``value`` by using ``callback(term)`` to retrieve the
240 | translation of terms.
241 |
242 | claim_count
243 |
244 | color
245 |
246 | comment
247 | Very similar to :class:`~.Char` but used for longer contents, does not
248 | have a size and usually displayed as a multiline text box.
249 |
250 | :param translate: enable the translation of the field's values; use
251 | ``translate=True`` to translate field values as a whole; ``translate``
252 | may also be a callable such that ``translate(callback, value)``
253 | translates ``value`` by using ``callback(term)`` to retrieve the
254 | translation of terms.
255 |
256 | commercial_partner_id
257 | The value of such a field is a recordset of size 0 (no
258 | record) or 1 (a single record).
259 |
260 | :param comodel_name: name of the target model (string)
261 |
262 | :param domain: an optional domain to set on candidate values on the
263 | client side (domain or string)
264 |
265 | :param context: an optional context to use on the client side when
266 | handling that field (dictionary)
267 |
268 | :param ondelete: what to do when the referred record is deleted;
269 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
270 |
271 | :param auto_join: whether JOINs are generated upon search through that
272 | field (boolean, by default ``False``)
273 |
274 | :param delegate: set it to ``True`` to make fields of the target model
275 | accessible from the current model (corresponds to ``_inherits``)
276 |
277 | The attribute ``comodel_name`` is mandatory except in the case of related
278 | fields or field extensions.
279 |
280 | company_id
281 | The value of such a field is a recordset of size 0 (no
282 | record) or 1 (a single record).
283 |
284 | :param comodel_name: name of the target model (string)
285 |
286 | :param domain: an optional domain to set on candidate values on the
287 | client side (domain or string)
288 |
289 | :param context: an optional context to use on the client side when
290 | handling that field (dictionary)
291 |
292 | :param ondelete: what to do when the referred record is deleted;
293 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
294 |
295 | :param auto_join: whether JOINs are generated upon search through that
296 | field (boolean, by default ``False``)
297 |
298 | :param delegate: set it to ``True`` to make fields of the target model
299 | accessible from the current model (corresponds to ``_inherits``)
300 |
301 | The attribute ``comodel_name`` is mandatory except in the case of related
302 | fields or field extensions.
303 |
304 | company_type
305 | :param selection: specifies the possible values for this field.
306 | It is given as either a list of pairs (``value``, ``string``), or a
307 | model method, or a method name.
308 | :param selection_add: provides an extension of the selection in the case
309 | of an overridden field. It is a list of pairs (``value``, ``string``).
310 |
311 | The attribute ``selection`` is mandatory except in the case of
312 | :ref:`related fields <field-related>` or :ref:`field extensions
313 | <field-incremental-definition>`.
314 |
315 | contact_address
316 | Basic string field, can be length-limited, usually displayed as a
317 | single-line string in clients.
318 |
319 | :param int size: the maximum size of values stored for that field
320 |
321 | :param translate: enable the translation of the field's values; use
322 | ``translate=True`` to translate field values as a whole; ``translate``
323 | may also be a callable such that ``translate(callback, value)``
324 | translates ``value`` by using ``callback(term)`` to retrieve the
325 | translation of terms.
326 |
327 | contract_ids
328 | One2many field; the value of such a field is the recordset of all the
329 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
330 | the current record.
331 |
332 | :param comodel_name: name of the target model (string)
333 |
334 | :param inverse_name: name of the inverse ``Many2one`` field in
335 | ``comodel_name`` (string)
336 |
337 | :param domain: an optional domain to set on candidate values on the
338 | client side (domain or string)
339 |
340 | :param context: an optional context to use on the client side when
341 | handling that field (dictionary)
342 |
343 | :param auto_join: whether JOINs are generated upon search through that
344 | field (boolean, by default ``False``)
345 |
346 | :param limit: optional limit to use upon read (integer)
347 |
348 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
349 | the case of related fields or field extensions.
350 |
351 | contracts_count
352 |
353 | country_id
354 | The value of such a field is a recordset of size 0 (no
355 | record) or 1 (a single record).
356 |
357 | :param comodel_name: name of the target model (string)
358 |
359 | :param domain: an optional domain to set on candidate values on the
360 | client side (domain or string)
361 |
362 | :param context: an optional context to use on the client side when
363 | handling that field (dictionary)
364 |
365 | :param ondelete: what to do when the referred record is deleted;
366 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
367 |
368 | :param auto_join: whether JOINs are generated upon search through that
369 | field (boolean, by default ``False``)
370 |
371 | :param delegate: set it to ``True`` to make fields of the target model
372 | accessible from the current model (corresponds to ``_inherits``)
373 |
374 | The attribute ``comodel_name`` is mandatory except in the case of related
375 | fields or field extensions.
376 |
377 | create_date
378 |
379 | create_uid
380 | The value of such a field is a recordset of size 0 (no
381 | record) or 1 (a single record).
382 |
383 | :param comodel_name: name of the target model (string)
384 |
385 | :param domain: an optional domain to set on candidate values on the
386 | client side (domain or string)
387 |
388 | :param context: an optional context to use on the client side when
389 | handling that field (dictionary)
390 |
391 | :param ondelete: what to do when the referred record is deleted;
392 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
393 |
394 | :param auto_join: whether JOINs are generated upon search through that
395 | field (boolean, by default ``False``)
396 |
397 | :param delegate: set it to ``True`` to make fields of the target model
398 | accessible from the current model (corresponds to ``_inherits``)
399 |
400 | The attribute ``comodel_name`` is mandatory except in the case of related
401 | fields or field extensions.
402 |
403 | credit
404 | The decimal precision and currency symbol are taken from the attribute
405 |
406 | :param currency_field: name of the field holding the currency this monetary
407 | field is expressed in (default: `currency_id`)
408 |
409 | credit_limit
410 | The precision digits are given by the attribute
411 |
412 | :param digits: a pair (total, decimal), or a function taking a database
413 | cursor and returning a pair (total, decimal)
414 |
415 | currency_id
416 | The value of such a field is a recordset of size 0 (no
417 | record) or 1 (a single record).
418 |
419 | :param comodel_name: name of the target model (string)
420 |
421 | :param domain: an optional domain to set on candidate values on the
422 | client side (domain or string)
423 |
424 | :param context: an optional context to use on the client side when
425 | handling that field (dictionary)
426 |
427 | :param ondelete: what to do when the referred record is deleted;
428 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
429 |
430 | :param auto_join: whether JOINs are generated upon search through that
431 | field (boolean, by default ``False``)
432 |
433 | :param delegate: set it to ``True`` to make fields of the target model
434 | accessible from the current model (corresponds to ``_inherits``)
435 |
436 | The attribute ``comodel_name`` is mandatory except in the case of related
437 | fields or field extensions.
438 |
439 | customer
440 |
441 | date
442 |
443 | debit
444 | The decimal precision and currency symbol are taken from the attribute
445 |
446 | :param currency_field: name of the field holding the currency this monetary
447 | field is expressed in (default: `currency_id`)
448 |
449 | debit_limit
450 | The decimal precision and currency symbol are taken from the attribute
451 |
452 | :param currency_field: name of the field holding the currency this monetary
453 | field is expressed in (default: `currency_id`)
454 |
455 | display_name
456 | Basic string field, can be length-limited, usually displayed as a
457 | single-line string in clients.
458 |
459 | :param int size: the maximum size of values stored for that field
460 |
461 | :param translate: enable the translation of the field's values; use
462 | ``translate=True`` to translate field values as a whole; ``translate``
463 | may also be a callable such that ``translate(callback, value)``
464 | translates ``value`` by using ``callback(term)`` to retrieve the
465 | translation of terms.
466 |
467 | doc_count
468 |
469 | email
470 | Basic string field, can be length-limited, usually displayed as a
471 | single-line string in clients.
472 |
473 | :param int size: the maximum size of values stored for that field
474 |
475 | :param translate: enable the translation of the field's values; use
476 | ``translate=True`` to translate field values as a whole; ``translate``
477 | may also be a callable such that ``translate(callback, value)``
478 | translates ``value`` by using ``callback(term)`` to retrieve the
479 | translation of terms.
480 |
481 | employee
482 |
483 | fax
484 |
485 | firstname
486 | Basic string field, can be length-limited, usually displayed as a
487 | single-line string in clients.
488 |
489 | :param int size: the maximum size of values stored for that field
490 |
491 | :param translate: enable the translation of the field's values; use
492 | ``translate=True`` to translate field values as a whole; ``translate``
493 | may also be a callable such that ``translate(callback, value)``
494 | translates ``value`` by using ``callback(term)`` to retrieve the
495 | translation of terms.
496 |
497 | function
498 | Basic string field, can be length-limited, usually displayed as a
499 | single-line string in clients.
500 |
501 | :param int size: the maximum size of values stored for that field
502 |
503 | :param translate: enable the translation of the field's values; use
504 | ``translate=True`` to translate field values as a whole; ``translate``
505 | may also be a callable such that ``translate(callback, value)``
506 | translates ``value`` by using ``callback(term)`` to retrieve the
507 | translation of terms.
508 |
509 | gender
510 | :param selection: specifies the possible values for this field.
511 | It is given as either a list of pairs (``value``, ``string``), or a
512 | model method, or a method name.
513 | :param selection_add: provides an extension of the selection in the case
514 | of an overridden field. It is a list of pairs (``value``, ``string``).
515 |
516 | The attribute ``selection`` is mandatory except in the case of
517 | :ref:`related fields <field-related>` or :ref:`field extensions
518 | <field-incremental-definition>`.
519 |
520 | has_unreconciled_entries
521 |
522 | id
523 | Special case for field 'id'.
524 |
525 | im_status
526 | Basic string field, can be length-limited, usually displayed as a
527 | single-line string in clients.
528 |
529 | :param int size: the maximum size of values stored for that field
530 |
531 | :param translate: enable the translation of the field's values; use
532 | ``translate=True`` to translate field values as a whole; ``translate``
533 | may also be a callable such that ``translate(callback, value)``
534 | translates ``value`` by using ``callback(term)`` to retrieve the
535 | translation of terms.
536 |
537 | image
538 |
539 | image_medium
540 |
541 | image_small
542 |
543 | invoice_ids
544 | One2many field; the value of such a field is the recordset of all the
545 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
546 | the current record.
547 |
548 | :param comodel_name: name of the target model (string)
549 |
550 | :param inverse_name: name of the inverse ``Many2one`` field in
551 | ``comodel_name`` (string)
552 |
553 | :param domain: an optional domain to set on candidate values on the
554 | client side (domain or string)
555 |
556 | :param context: an optional context to use on the client side when
557 | handling that field (dictionary)
558 |
559 | :param auto_join: whether JOINs are generated upon search through that
560 | field (boolean, by default ``False``)
561 |
562 | :param limit: optional limit to use upon read (integer)
563 |
564 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
565 | the case of related fields or field extensions.
566 |
567 | is_company
568 |
569 | issue_count
570 |
571 | issued_total
572 | The decimal precision and currency symbol are taken from the attribute
573 |
574 | :param currency_field: name of the field holding the currency this monetary
575 | field is expressed in (default: `currency_id`)
576 |
577 | journal_item_count
578 |
579 | lang
580 | :param selection: specifies the possible values for this field.
581 | It is given as either a list of pairs (``value``, ``string``), or a
582 | model method, or a method name.
583 | :param selection_add: provides an extension of the selection in the case
584 | of an overridden field. It is a list of pairs (``value``, ``string``).
585 |
586 | The attribute ``selection`` is mandatory except in the case of
587 | :ref:`related fields <field-related>` or :ref:`field extensions
588 | <field-incremental-definition>`.
589 |
590 | last_time_entries_checked
591 |
592 | last_website_so_id
593 | The value of such a field is a recordset of size 0 (no
594 | record) or 1 (a single record).
595 |
596 | :param comodel_name: name of the target model (string)
597 |
598 | :param domain: an optional domain to set on candidate values on the
599 | client side (domain or string)
600 |
601 | :param context: an optional context to use on the client side when
602 | handling that field (dictionary)
603 |
604 | :param ondelete: what to do when the referred record is deleted;
605 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
606 |
607 | :param auto_join: whether JOINs are generated upon search through that
608 | field (boolean, by default ``False``)
609 |
610 | :param delegate: set it to ``True`` to make fields of the target model
611 | accessible from the current model (corresponds to ``_inherits``)
612 |
613 | The attribute ``comodel_name`` is mandatory except in the case of related
614 | fields or field extensions.
615 |
616 | lastname
617 | Basic string field, can be length-limited, usually displayed as a
618 | single-line string in clients.
619 |
620 | :param int size: the maximum size of values stored for that field
621 |
622 | :param translate: enable the translation of the field's values; use
623 | ``translate=True`` to translate field values as a whole; ``translate``
624 | may also be a callable such that ``translate(callback, value)``
625 | translates ``value`` by using ``callback(term)`` to retrieve the
626 | translation of terms.
627 |
628 | local_vat
629 | Basic string field, can be length-limited, usually displayed as a
630 | single-line string in clients.
631 |
632 | :param int size: the maximum size of values stored for that field
633 |
634 | :param translate: enable the translation of the field's values; use
635 | ``translate=True`` to translate field values as a whole; ``translate``
636 | may also be a callable such that ``translate(callback, value)``
637 | translates ``value`` by using ``callback(term)`` to retrieve the
638 | translation of terms.
639 |
640 | meeting_count
641 |
642 | meeting_ids
643 | Many2many field; the value of such a field is the recordset.
644 |
645 | :param comodel_name: name of the target model (string)
646 |
647 | The attribute ``comodel_name`` is mandatory except in the case of related
648 | fields or field extensions.
649 |
650 | :param relation: optional name of the table that stores the relation in
651 | the database (string)
652 |
653 | :param column1: optional name of the column referring to "these" records
654 | in the table ``relation`` (string)
655 |
656 | :param column2: optional name of the column referring to "those" records
657 | in the table ``relation`` (string)
658 |
659 | The attributes ``relation``, ``column1`` and ``column2`` are optional. If not
660 | given, names are automatically generated from model names, provided
661 | ``model_name`` and ``comodel_name`` are different!
662 |
663 | :param domain: an optional domain to set on candidate values on the
664 | client side (domain or string)
665 |
666 | :param context: an optional context to use on the client side when
667 | handling that field (dictionary)
668 |
669 | :param limit: optional limit to use upon read (integer)
670 |
671 | message_channel_ids
672 | Many2many field; the value of such a field is the recordset.
673 |
674 | :param comodel_name: name of the target model (string)
675 |
676 | The attribute ``comodel_name`` is mandatory except in the case of related
677 | fields or field extensions.
678 |
679 | :param relation: optional name of the table that stores the relation in
680 | the database (string)
681 |
682 | :param column1: optional name of the column referring to "these" records
683 | in the table ``relation`` (string)
684 |
685 | :param column2: optional name of the column referring to "those" records
686 | in the table ``relation`` (string)
687 |
688 | The attributes ``relation``, ``column1`` and ``column2`` are optional. If not
689 | given, names are automatically generated from model names, provided
690 | ``model_name`` and ``comodel_name`` are different!
691 |
692 | :param domain: an optional domain to set on candidate values on the
693 | client side (domain or string)
694 |
695 | :param context: an optional context to use on the client side when
696 | handling that field (dictionary)
697 |
698 | :param limit: optional limit to use upon read (integer)
699 |
700 | message_follower_ids
701 | One2many field; the value of such a field is the recordset of all the
702 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
703 | the current record.
704 |
705 | :param comodel_name: name of the target model (string)
706 |
707 | :param inverse_name: name of the inverse ``Many2one`` field in
708 | ``comodel_name`` (string)
709 |
710 | :param domain: an optional domain to set on candidate values on the
711 | client side (domain or string)
712 |
713 | :param context: an optional context to use on the client side when
714 | handling that field (dictionary)
715 |
716 | :param auto_join: whether JOINs are generated upon search through that
717 | field (boolean, by default ``False``)
718 |
719 | :param limit: optional limit to use upon read (integer)
720 |
721 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
722 | the case of related fields or field extensions.
723 |
724 | message_ids
725 | One2many field; the value of such a field is the recordset of all the
726 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
727 | the current record.
728 |
729 | :param comodel_name: name of the target model (string)
730 |
731 | :param inverse_name: name of the inverse ``Many2one`` field in
732 | ``comodel_name`` (string)
733 |
734 | :param domain: an optional domain to set on candidate values on the
735 | client side (domain or string)
736 |
737 | :param context: an optional context to use on the client side when
738 | handling that field (dictionary)
739 |
740 | :param auto_join: whether JOINs are generated upon search through that
741 | field (boolean, by default ``False``)
742 |
743 | :param limit: optional limit to use upon read (integer)
744 |
745 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
746 | the case of related fields or field extensions.
747 |
748 | message_is_follower
749 |
750 | message_last_post
751 |
752 | message_needaction
753 |
754 | message_needaction_counter
755 |
756 | message_partner_ids
757 | Many2many field; the value of such a field is the recordset.
758 |
759 | :param comodel_name: name of the target model (string)
760 |
761 | The attribute ``comodel_name`` is mandatory except in the case of related
762 | fields or field extensions.
763 |
764 | :param relation: optional name of the table that stores the relation in
765 | the database (string)
766 |
767 | :param column1: optional name of the column referring to "these" records
768 | in the table ``relation`` (string)
769 |
770 | :param column2: optional name of the column referring to "those" records
771 | in the table ``relation`` (string)
772 |
773 | The attributes ``relation``, ``column1`` and ``column2`` are optional. If not
774 | given, names are automatically generated from model names, provided
775 | ``model_name`` and ``comodel_name`` are different!
776 |
777 | :param domain: an optional domain to set on candidate values on the
778 | client side (domain or string)
779 |
780 | :param context: an optional context to use on the client side when
781 | handling that field (dictionary)
782 |
783 | :param limit: optional limit to use upon read (integer)
784 |
785 | message_unread
786 |
787 | message_unread_counter
788 |
789 | mobile
790 |
791 | name
792 | Basic string field, can be length-limited, usually displayed as a
793 | single-line string in clients.
794 |
795 | :param int size: the maximum size of values stored for that field
796 |
797 | :param translate: enable the translation of the field's values; use
798 | ``translate=True`` to translate field values as a whole; ``translate``
799 | may also be a callable such that ``translate(callback, value)``
800 | translates ``value`` by using ``callback(term)`` to retrieve the
801 | translation of terms.
802 |
803 | notify_email
804 | :param selection: specifies the possible values for this field.
805 | It is given as either a list of pairs (``value``, ``string``), or a
806 | model method, or a method name.
807 | :param selection_add: provides an extension of the selection in the case
808 | of an overridden field. It is a list of pairs (``value``, ``string``).
809 |
810 | The attribute ``selection`` is mandatory except in the case of
811 | :ref:`related fields <field-related>` or :ref:`field extensions
812 | <field-incremental-definition>`.
813 |
814 | old_id
815 |
816 | old_password
817 | Basic string field, can be length-limited, usually displayed as a
818 | single-line string in clients.
819 |
820 | :param int size: the maximum size of values stored for that field
821 |
822 | :param translate: enable the translation of the field's values; use
823 | ``translate=True`` to translate field values as a whole; ``translate``
824 | may also be a callable such that ``translate(callback, value)``
825 | translates ``value`` by using ``callback(term)`` to retrieve the
826 | translation of terms.
827 |
828 | one_man
829 |
830 | opportunity_count
831 |
832 | opportunity_ids
833 | One2many field; the value of such a field is the recordset of all the
834 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
835 | the current record.
836 |
837 | :param comodel_name: name of the target model (string)
838 |
839 | :param inverse_name: name of the inverse ``Many2one`` field in
840 | ``comodel_name`` (string)
841 |
842 | :param domain: an optional domain to set on candidate values on the
843 | client side (domain or string)
844 |
845 | :param context: an optional context to use on the client side when
846 | handling that field (dictionary)
847 |
848 | :param auto_join: whether JOINs are generated upon search through that
849 | field (boolean, by default ``False``)
850 |
851 | :param limit: optional limit to use upon read (integer)
852 |
853 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
854 | the case of related fields or field extensions.
855 |
856 | opt_out
857 |
858 | parent_id
859 | The value of such a field is a recordset of size 0 (no
860 | record) or 1 (a single record).
861 |
862 | :param comodel_name: name of the target model (string)
863 |
864 | :param domain: an optional domain to set on candidate values on the
865 | client side (domain or string)
866 |
867 | :param context: an optional context to use on the client side when
868 | handling that field (dictionary)
869 |
870 | :param ondelete: what to do when the referred record is deleted;
871 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
872 |
873 | :param auto_join: whether JOINs are generated upon search through that
874 | field (boolean, by default ``False``)
875 |
876 | :param delegate: set it to ``True`` to make fields of the target model
877 | accessible from the current model (corresponds to ``_inherits``)
878 |
879 | The attribute ``comodel_name`` is mandatory except in the case of related
880 | fields or field extensions.
881 |
882 | parent_name
883 | Basic string field, can be length-limited, usually displayed as a
884 | single-line string in clients.
885 |
886 | :param int size: the maximum size of values stored for that field
887 |
888 | :param translate: enable the translation of the field's values; use
889 | ``translate=True`` to translate field values as a whole; ``translate``
890 | may also be a callable such that ``translate(callback, value)``
891 | translates ``value`` by using ``callback(term)`` to retrieve the
892 | translation of terms.
893 |
894 | payment_method_count
895 |
896 | payment_method_ids
897 | One2many field; the value of such a field is the recordset of all the
898 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
899 | the current record.
900 |
901 | :param comodel_name: name of the target model (string)
902 |
903 | :param inverse_name: name of the inverse ``Many2one`` field in
904 | ``comodel_name`` (string)
905 |
906 | :param domain: an optional domain to set on candidate values on the
907 | client side (domain or string)
908 |
909 | :param context: an optional context to use on the client side when
910 | handling that field (dictionary)
911 |
912 | :param auto_join: whether JOINs are generated upon search through that
913 | field (boolean, by default ``False``)
914 |
915 | :param limit: optional limit to use upon read (integer)
916 |
917 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
918 | the case of related fields or field extensions.
919 |
920 | phone
921 |
922 | phonecall_count
923 |
924 | phonecall_ids
925 | One2many field; the value of such a field is the recordset of all the
926 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
927 | the current record.
928 |
929 | :param comodel_name: name of the target model (string)
930 |
931 | :param inverse_name: name of the inverse ``Many2one`` field in
932 | ``comodel_name`` (string)
933 |
934 | :param domain: an optional domain to set on candidate values on the
935 | client side (domain or string)
936 |
937 | :param context: an optional context to use on the client side when
938 | handling that field (dictionary)
939 |
940 | :param auto_join: whether JOINs are generated upon search through that
941 | field (boolean, by default ``False``)
942 |
943 | :param limit: optional limit to use upon read (integer)
944 |
945 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
946 | the case of related fields or field extensions.
947 |
948 | private_state
949 | :param selection: specifies the possible values for this field.
950 | It is given as either a list of pairs (``value``, ``string``), or a
951 | model method, or a method name.
952 | :param selection_add: provides an extension of the selection in the case
953 | of an overridden field. It is a list of pairs (``value``, ``string``).
954 |
955 | The attribute ``selection`` is mandatory except in the case of
956 | :ref:`related fields <field-related>` or :ref:`field extensions
957 | <field-incremental-definition>`.
958 |
959 | property_account_payable_id
960 | The value of such a field is a recordset of size 0 (no
961 | record) or 1 (a single record).
962 |
963 | :param comodel_name: name of the target model (string)
964 |
965 | :param domain: an optional domain to set on candidate values on the
966 | client side (domain or string)
967 |
968 | :param context: an optional context to use on the client side when
969 | handling that field (dictionary)
970 |
971 | :param ondelete: what to do when the referred record is deleted;
972 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
973 |
974 | :param auto_join: whether JOINs are generated upon search through that
975 | field (boolean, by default ``False``)
976 |
977 | :param delegate: set it to ``True`` to make fields of the target model
978 | accessible from the current model (corresponds to ``_inherits``)
979 |
980 | The attribute ``comodel_name`` is mandatory except in the case of related
981 | fields or field extensions.
982 |
983 | property_account_position_id
984 | The value of such a field is a recordset of size 0 (no
985 | record) or 1 (a single record).
986 |
987 | :param comodel_name: name of the target model (string)
988 |
989 | :param domain: an optional domain to set on candidate values on the
990 | client side (domain or string)
991 |
992 | :param context: an optional context to use on the client side when
993 | handling that field (dictionary)
994 |
995 | :param ondelete: what to do when the referred record is deleted;
996 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
997 |
998 | :param auto_join: whether JOINs are generated upon search through that
999 | field (boolean, by default ``False``)
1000 |
1001 | :param delegate: set it to ``True`` to make fields of the target model
1002 | accessible from the current model (corresponds to ``_inherits``)
1003 |
1004 | The attribute ``comodel_name`` is mandatory except in the case of related
1005 | fields or field extensions.
1006 |
1007 | property_account_receivable_id
1008 | The value of such a field is a recordset of size 0 (no
1009 | record) or 1 (a single record).
1010 |
1011 | :param comodel_name: name of the target model (string)
1012 |
1013 | :param domain: an optional domain to set on candidate values on the
1014 | client side (domain or string)
1015 |
1016 | :param context: an optional context to use on the client side when
1017 | handling that field (dictionary)
1018 |
1019 | :param ondelete: what to do when the referred record is deleted;
1020 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1021 |
1022 | :param auto_join: whether JOINs are generated upon search through that
1023 | field (boolean, by default ``False``)
1024 |
1025 | :param delegate: set it to ``True`` to make fields of the target model
1026 | accessible from the current model (corresponds to ``_inherits``)
1027 |
1028 | The attribute ``comodel_name`` is mandatory except in the case of related
1029 | fields or field extensions.
1030 |
1031 | property_delivery_carrier_id
1032 | The value of such a field is a recordset of size 0 (no
1033 | record) or 1 (a single record).
1034 |
1035 | :param comodel_name: name of the target model (string)
1036 |
1037 | :param domain: an optional domain to set on candidate values on the
1038 | client side (domain or string)
1039 |
1040 | :param context: an optional context to use on the client side when
1041 | handling that field (dictionary)
1042 |
1043 | :param ondelete: what to do when the referred record is deleted;
1044 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1045 |
1046 | :param auto_join: whether JOINs are generated upon search through that
1047 | field (boolean, by default ``False``)
1048 |
1049 | :param delegate: set it to ``True`` to make fields of the target model
1050 | accessible from the current model (corresponds to ``_inherits``)
1051 |
1052 | The attribute ``comodel_name`` is mandatory except in the case of related
1053 | fields or field extensions.
1054 |
1055 | property_payment_term_id
1056 | The value of such a field is a recordset of size 0 (no
1057 | record) or 1 (a single record).
1058 |
1059 | :param comodel_name: name of the target model (string)
1060 |
1061 | :param domain: an optional domain to set on candidate values on the
1062 | client side (domain or string)
1063 |
1064 | :param context: an optional context to use on the client side when
1065 | handling that field (dictionary)
1066 |
1067 | :param ondelete: what to do when the referred record is deleted;
1068 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1069 |
1070 | :param auto_join: whether JOINs are generated upon search through that
1071 | field (boolean, by default ``False``)
1072 |
1073 | :param delegate: set it to ``True`` to make fields of the target model
1074 | accessible from the current model (corresponds to ``_inherits``)
1075 |
1076 | The attribute ``comodel_name`` is mandatory except in the case of related
1077 | fields or field extensions.
1078 |
1079 | property_product_pricelist
1080 | The value of such a field is a recordset of size 0 (no
1081 | record) or 1 (a single record).
1082 |
1083 | :param comodel_name: name of the target model (string)
1084 |
1085 | :param domain: an optional domain to set on candidate values on the
1086 | client side (domain or string)
1087 |
1088 | :param context: an optional context to use on the client side when
1089 | handling that field (dictionary)
1090 |
1091 | :param ondelete: what to do when the referred record is deleted;
1092 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1093 |
1094 | :param auto_join: whether JOINs are generated upon search through that
1095 | field (boolean, by default ``False``)
1096 |
1097 | :param delegate: set it to ``True`` to make fields of the target model
1098 | accessible from the current model (corresponds to ``_inherits``)
1099 |
1100 | The attribute ``comodel_name`` is mandatory except in the case of related
1101 | fields or field extensions.
1102 |
1103 | property_stock_customer
1104 | The value of such a field is a recordset of size 0 (no
1105 | record) or 1 (a single record).
1106 |
1107 | :param comodel_name: name of the target model (string)
1108 |
1109 | :param domain: an optional domain to set on candidate values on the
1110 | client side (domain or string)
1111 |
1112 | :param context: an optional context to use on the client side when
1113 | handling that field (dictionary)
1114 |
1115 | :param ondelete: what to do when the referred record is deleted;
1116 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1117 |
1118 | :param auto_join: whether JOINs are generated upon search through that
1119 | field (boolean, by default ``False``)
1120 |
1121 | :param delegate: set it to ``True`` to make fields of the target model
1122 | accessible from the current model (corresponds to ``_inherits``)
1123 |
1124 | The attribute ``comodel_name`` is mandatory except in the case of related
1125 | fields or field extensions.
1126 |
1127 | property_stock_supplier
1128 | The value of such a field is a recordset of size 0 (no
1129 | record) or 1 (a single record).
1130 |
1131 | :param comodel_name: name of the target model (string)
1132 |
1133 | :param domain: an optional domain to set on candidate values on the
1134 | client side (domain or string)
1135 |
1136 | :param context: an optional context to use on the client side when
1137 | handling that field (dictionary)
1138 |
1139 | :param ondelete: what to do when the referred record is deleted;
1140 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1141 |
1142 | :param auto_join: whether JOINs are generated upon search through that
1143 | field (boolean, by default ``False``)
1144 |
1145 | :param delegate: set it to ``True`` to make fields of the target model
1146 | accessible from the current model (corresponds to ``_inherits``)
1147 |
1148 | The attribute ``comodel_name`` is mandatory except in the case of related
1149 | fields or field extensions.
1150 |
1151 | property_supplier_payment_term_id
1152 | The value of such a field is a recordset of size 0 (no
1153 | record) or 1 (a single record).
1154 |
1155 | :param comodel_name: name of the target model (string)
1156 |
1157 | :param domain: an optional domain to set on candidate values on the
1158 | client side (domain or string)
1159 |
1160 | :param context: an optional context to use on the client side when
1161 | handling that field (dictionary)
1162 |
1163 | :param ondelete: what to do when the referred record is deleted;
1164 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1165 |
1166 | :param auto_join: whether JOINs are generated upon search through that
1167 | field (boolean, by default ``False``)
1168 |
1169 | :param delegate: set it to ``True`` to make fields of the target model
1170 | accessible from the current model (corresponds to ``_inherits``)
1171 |
1172 | The attribute ``comodel_name`` is mandatory except in the case of related
1173 | fields or field extensions.
1174 |
1175 | ref
1176 | Basic string field, can be length-limited, usually displayed as a
1177 | single-line string in clients.
1178 |
1179 | :param int size: the maximum size of values stored for that field
1180 |
1181 | :param translate: enable the translation of the field's values; use
1182 | ``translate=True`` to translate field values as a whole; ``translate``
1183 | may also be a callable such that ``translate(callback, value)``
1184 | translates ``value`` by using ``callback(term)`` to retrieve the
1185 | translation of terms.
1186 |
1187 | ref_company_ids
1188 | One2many field; the value of such a field is the recordset of all the
1189 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
1190 | the current record.
1191 |
1192 | :param comodel_name: name of the target model (string)
1193 |
1194 | :param inverse_name: name of the inverse ``Many2one`` field in
1195 | ``comodel_name`` (string)
1196 |
1197 | :param domain: an optional domain to set on candidate values on the
1198 | client side (domain or string)
1199 |
1200 | :param context: an optional context to use on the client side when
1201 | handling that field (dictionary)
1202 |
1203 | :param auto_join: whether JOINs are generated upon search through that
1204 | field (boolean, by default ``False``)
1205 |
1206 | :param limit: optional limit to use upon read (integer)
1207 |
1208 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
1209 | the case of related fields or field extensions.
1210 |
1211 | religion
1212 | :param selection: specifies the possible values for this field.
1213 | It is given as either a list of pairs (``value``, ``string``), or a
1214 | model method, or a method name.
1215 | :param selection_add: provides an extension of the selection in the case
1216 | of an overridden field. It is a list of pairs (``value``, ``string``).
1217 |
1218 | The attribute ``selection`` is mandatory except in the case of
1219 | :ref:`related fields <field-related>` or :ref:`field extensions
1220 | <field-incremental-definition>`.
1221 |
1222 | sale_order_count
1223 |
1224 | sale_order_ids
1225 | One2many field; the value of such a field is the recordset of all the
1226 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
1227 | the current record.
1228 |
1229 | :param comodel_name: name of the target model (string)
1230 |
1231 | :param inverse_name: name of the inverse ``Many2one`` field in
1232 | ``comodel_name`` (string)
1233 |
1234 | :param domain: an optional domain to set on candidate values on the
1235 | client side (domain or string)
1236 |
1237 | :param context: an optional context to use on the client side when
1238 | handling that field (dictionary)
1239 |
1240 | :param auto_join: whether JOINs are generated upon search through that
1241 | field (boolean, by default ``False``)
1242 |
1243 | :param limit: optional limit to use upon read (integer)
1244 |
1245 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
1246 | the case of related fields or field extensions.
1247 |
1248 | self
1249 | The value of such a field is a recordset of size 0 (no
1250 | record) or 1 (a single record).
1251 |
1252 | :param comodel_name: name of the target model (string)
1253 |
1254 | :param domain: an optional domain to set on candidate values on the
1255 | client side (domain or string)
1256 |
1257 | :param context: an optional context to use on the client side when
1258 | handling that field (dictionary)
1259 |
1260 | :param ondelete: what to do when the referred record is deleted;
1261 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1262 |
1263 | :param auto_join: whether JOINs are generated upon search through that
1264 | field (boolean, by default ``False``)
1265 |
1266 | :param delegate: set it to ``True`` to make fields of the target model
1267 | accessible from the current model (corresponds to ``_inherits``)
1268 |
1269 | The attribute ``comodel_name`` is mandatory except in the case of related
1270 | fields or field extensions.
1271 |
1272 | shop_id
1273 | The value of such a field is a recordset of size 0 (no
1274 | record) or 1 (a single record).
1275 |
1276 | :param comodel_name: name of the target model (string)
1277 |
1278 | :param domain: an optional domain to set on candidate values on the
1279 | client side (domain or string)
1280 |
1281 | :param context: an optional context to use on the client side when
1282 | handling that field (dictionary)
1283 |
1284 | :param ondelete: what to do when the referred record is deleted;
1285 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1286 |
1287 | :param auto_join: whether JOINs are generated upon search through that
1288 | field (boolean, by default ``False``)
1289 |
1290 | :param delegate: set it to ``True`` to make fields of the target model
1291 | accessible from the current model (corresponds to ``_inherits``)
1292 |
1293 | The attribute ``comodel_name`` is mandatory except in the case of related
1294 | fields or field extensions.
1295 |
1296 | shopname
1297 | Basic string field, can be length-limited, usually displayed as a
1298 | single-line string in clients.
1299 |
1300 | :param int size: the maximum size of values stored for that field
1301 |
1302 | :param translate: enable the translation of the field's values; use
1303 | ``translate=True`` to translate field values as a whole; ``translate``
1304 | may also be a callable such that ``translate(callback, value)``
1305 | translates ``value`` by using ``callback(term)`` to retrieve the
1306 | translation of terms.
1307 |
1308 | signup_expiration
1309 |
1310 | signup_token
1311 | Basic string field, can be length-limited, usually displayed as a
1312 | single-line string in clients.
1313 |
1314 | :param int size: the maximum size of values stored for that field
1315 |
1316 | :param translate: enable the translation of the field's values; use
1317 | ``translate=True`` to translate field values as a whole; ``translate``
1318 | may also be a callable such that ``translate(callback, value)``
1319 | translates ``value`` by using ``callback(term)`` to retrieve the
1320 | translation of terms.
1321 |
1322 | signup_type
1323 | Basic string field, can be length-limited, usually displayed as a
1324 | single-line string in clients.
1325 |
1326 | :param int size: the maximum size of values stored for that field
1327 |
1328 | :param translate: enable the translation of the field's values; use
1329 | ``translate=True`` to translate field values as a whole; ``translate``
1330 | may also be a callable such that ``translate(callback, value)``
1331 | translates ``value`` by using ``callback(term)`` to retrieve the
1332 | translation of terms.
1333 |
1334 | signup_url
1335 | Basic string field, can be length-limited, usually displayed as a
1336 | single-line string in clients.
1337 |
1338 | :param int size: the maximum size of values stored for that field
1339 |
1340 | :param translate: enable the translation of the field's values; use
1341 | ``translate=True`` to translate field values as a whole; ``translate``
1342 | may also be a callable such that ``translate(callback, value)``
1343 | translates ``value`` by using ``callback(term)`` to retrieve the
1344 | translation of terms.
1345 |
1346 | signup_valid
1347 |
1348 | spouse_id
1349 | The value of such a field is a recordset of size 0 (no
1350 | record) or 1 (a single record).
1351 |
1352 | :param comodel_name: name of the target model (string)
1353 |
1354 | :param domain: an optional domain to set on candidate values on the
1355 | client side (domain or string)
1356 |
1357 | :param context: an optional context to use on the client side when
1358 | handling that field (dictionary)
1359 |
1360 | :param ondelete: what to do when the referred record is deleted;
1361 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1362 |
1363 | :param auto_join: whether JOINs are generated upon search through that
1364 | field (boolean, by default ``False``)
1365 |
1366 | :param delegate: set it to ``True`` to make fields of the target model
1367 | accessible from the current model (corresponds to ``_inherits``)
1368 |
1369 | The attribute ``comodel_name`` is mandatory except in the case of related
1370 | fields or field extensions.
1371 |
1372 | state_id
1373 | The value of such a field is a recordset of size 0 (no
1374 | record) or 1 (a single record).
1375 |
1376 | :param comodel_name: name of the target model (string)
1377 |
1378 | :param domain: an optional domain to set on candidate values on the
1379 | client side (domain or string)
1380 |
1381 | :param context: an optional context to use on the client side when
1382 | handling that field (dictionary)
1383 |
1384 | :param ondelete: what to do when the referred record is deleted;
1385 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1386 |
1387 | :param auto_join: whether JOINs are generated upon search through that
1388 | field (boolean, by default ``False``)
1389 |
1390 | :param delegate: set it to ``True`` to make fields of the target model
1391 | accessible from the current model (corresponds to ``_inherits``)
1392 |
1393 | The attribute ``comodel_name`` is mandatory except in the case of related
1394 | fields or field extensions.
1395 |
1396 | street
1397 | Basic string field, can be length-limited, usually displayed as a
1398 | single-line string in clients.
1399 |
1400 | :param int size: the maximum size of values stored for that field
1401 |
1402 | :param translate: enable the translation of the field's values; use
1403 | ``translate=True`` to translate field values as a whole; ``translate``
1404 | may also be a callable such that ``translate(callback, value)``
1405 | translates ``value`` by using ``callback(term)`` to retrieve the
1406 | translation of terms.
1407 |
1408 | street2
1409 | Basic string field, can be length-limited, usually displayed as a
1410 | single-line string in clients.
1411 |
1412 | :param int size: the maximum size of values stored for that field
1413 |
1414 | :param translate: enable the translation of the field's values; use
1415 | ``translate=True`` to translate field values as a whole; ``translate``
1416 | may also be a callable such that ``translate(callback, value)``
1417 | translates ``value`` by using ``callback(term)`` to retrieve the
1418 | translation of terms.
1419 |
1420 | suburb
1421 | Basic string field, can be length-limited, usually displayed as a
1422 | single-line string in clients.
1423 |
1424 | :param int size: the maximum size of values stored for that field
1425 |
1426 | :param translate: enable the translation of the field's values; use
1427 | ``translate=True`` to translate field values as a whole; ``translate``
1428 | may also be a callable such that ``translate(callback, value)``
1429 | translates ``value`` by using ``callback(term)`` to retrieve the
1430 | translation of terms.
1431 |
1432 | supplier
1433 |
1434 | task_count
1435 |
1436 | task_ids
1437 | One2many field; the value of such a field is the recordset of all the
1438 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
1439 | the current record.
1440 |
1441 | :param comodel_name: name of the target model (string)
1442 |
1443 | :param inverse_name: name of the inverse ``Many2one`` field in
1444 | ``comodel_name`` (string)
1445 |
1446 | :param domain: an optional domain to set on candidate values on the
1447 | client side (domain or string)
1448 |
1449 | :param context: an optional context to use on the client side when
1450 | handling that field (dictionary)
1451 |
1452 | :param auto_join: whether JOINs are generated upon search through that
1453 | field (boolean, by default ``False``)
1454 |
1455 | :param limit: optional limit to use upon read (integer)
1456 |
1457 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
1458 | the case of related fields or field extensions.
1459 |
1460 | team_id
1461 | The value of such a field is a recordset of size 0 (no
1462 | record) or 1 (a single record).
1463 |
1464 | :param comodel_name: name of the target model (string)
1465 |
1466 | :param domain: an optional domain to set on candidate values on the
1467 | client side (domain or string)
1468 |
1469 | :param context: an optional context to use on the client side when
1470 | handling that field (dictionary)
1471 |
1472 | :param ondelete: what to do when the referred record is deleted;
1473 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1474 |
1475 | :param auto_join: whether JOINs are generated upon search through that
1476 | field (boolean, by default ``False``)
1477 |
1478 | :param delegate: set it to ``True`` to make fields of the target model
1479 | accessible from the current model (corresponds to ``_inherits``)
1480 |
1481 | The attribute ``comodel_name`` is mandatory except in the case of related
1482 | fields or field extensions.
1483 |
1484 | title
1485 | The value of such a field is a recordset of size 0 (no
1486 | record) or 1 (a single record).
1487 |
1488 | :param comodel_name: name of the target model (string)
1489 |
1490 | :param domain: an optional domain to set on candidate values on the
1491 | client side (domain or string)
1492 |
1493 | :param context: an optional context to use on the client side when
1494 | handling that field (dictionary)
1495 |
1496 | :param ondelete: what to do when the referred record is deleted;
1497 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1498 |
1499 | :param auto_join: whether JOINs are generated upon search through that
1500 | field (boolean, by default ``False``)
1501 |
1502 | :param delegate: set it to ``True`` to make fields of the target model
1503 | accessible from the current model (corresponds to ``_inherits``)
1504 |
1505 | The attribute ``comodel_name`` is mandatory except in the case of related
1506 | fields or field extensions.
1507 |
1508 | total_invoiced
1509 | The decimal precision and currency symbol are taken from the attribute
1510 |
1511 | :param currency_field: name of the field holding the currency this monetary
1512 | field is expressed in (default: `currency_id`)
1513 |
1514 | type
1515 | :param selection: specifies the possible values for this field.
1516 | It is given as either a list of pairs (``value``, ``string``), or a
1517 | model method, or a method name.
1518 | :param selection_add: provides an extension of the selection in the case
1519 | of an overridden field. It is a list of pairs (``value``, ``string``).
1520 |
1521 | The attribute ``selection`` is mandatory except in the case of
1522 | :ref:`related fields <field-related>` or :ref:`field extensions
1523 | <field-incremental-definition>`.
1524 |
1525 | tz
1526 | :param selection: specifies the possible values for this field.
1527 | It is given as either a list of pairs (``value``, ``string``), or a
1528 | model method, or a method name.
1529 | :param selection_add: provides an extension of the selection in the case
1530 | of an overridden field. It is a list of pairs (``value``, ``string``).
1531 |
1532 | The attribute ``selection`` is mandatory except in the case of
1533 | :ref:`related fields <field-related>` or :ref:`field extensions
1534 | <field-incremental-definition>`.
1535 |
1536 | tz_offset
1537 | Basic string field, can be length-limited, usually displayed as a
1538 | single-line string in clients.
1539 |
1540 | :param int size: the maximum size of values stored for that field
1541 |
1542 | :param translate: enable the translation of the field's values; use
1543 | ``translate=True`` to translate field values as a whole; ``translate``
1544 | may also be a callable such that ``translate(callback, value)``
1545 | translates ``value`` by using ``callback(term)`` to retrieve the
1546 | translation of terms.
1547 |
1548 | use_parent_address
1549 |
1550 | user_id
1551 | The value of such a field is a recordset of size 0 (no
1552 | record) or 1 (a single record).
1553 |
1554 | :param comodel_name: name of the target model (string)
1555 |
1556 | :param domain: an optional domain to set on candidate values on the
1557 | client side (domain or string)
1558 |
1559 | :param context: an optional context to use on the client side when
1560 | handling that field (dictionary)
1561 |
1562 | :param ondelete: what to do when the referred record is deleted;
1563 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1564 |
1565 | :param auto_join: whether JOINs are generated upon search through that
1566 | field (boolean, by default ``False``)
1567 |
1568 | :param delegate: set it to ``True`` to make fields of the target model
1569 | accessible from the current model (corresponds to ``_inherits``)
1570 |
1571 | The attribute ``comodel_name`` is mandatory except in the case of related
1572 | fields or field extensions.
1573 |
1574 | user_ids
1575 | One2many field; the value of such a field is the recordset of all the
1576 | records in ``comodel_name`` such that the field ``inverse_name`` is equal to
1577 | the current record.
1578 |
1579 | :param comodel_name: name of the target model (string)
1580 |
1581 | :param inverse_name: name of the inverse ``Many2one`` field in
1582 | ``comodel_name`` (string)
1583 |
1584 | :param domain: an optional domain to set on candidate values on the
1585 | client side (domain or string)
1586 |
1587 | :param context: an optional context to use on the client side when
1588 | handling that field (dictionary)
1589 |
1590 | :param auto_join: whether JOINs are generated upon search through that
1591 | field (boolean, by default ``False``)
1592 |
1593 | :param limit: optional limit to use upon read (integer)
1594 |
1595 | The attributes ``comodel_name`` and ``inverse_name`` are mandatory except in
1596 | the case of related fields or field extensions.
1597 |
1598 | vat
1599 | Basic string field, can be length-limited, usually displayed as a
1600 | single-line string in clients.
1601 |
1602 | :param int size: the maximum size of values stored for that field
1603 |
1604 | :param translate: enable the translation of the field's values; use
1605 | ``translate=True`` to translate field values as a whole; ``translate``
1606 | may also be a callable such that ``translate(callback, value)``
1607 | translates ``value`` by using ``callback(term)`` to retrieve the
1608 | translation of terms.
1609 |
1610 | website
1611 | Basic string field, can be length-limited, usually displayed as a
1612 | single-line string in clients.
1613 |
1614 | :param int size: the maximum size of values stored for that field
1615 |
1616 | :param translate: enable the translation of the field's values; use
1617 | ``translate=True`` to translate field values as a whole; ``translate``
1618 | may also be a callable such that ``translate(callback, value)``
1619 | translates ``value`` by using ``callback(term)`` to retrieve the
1620 | translation of terms.
1621 |
1622 | website_description
1623 |
1624 | website_meta_description
1625 | Very similar to :class:`~.Char` but used for longer contents, does not
1626 | have a size and usually displayed as a multiline text box.
1627 |
1628 | :param translate: enable the translation of the field's values; use
1629 | ``translate=True`` to translate field values as a whole; ``translate``
1630 | may also be a callable such that ``translate(callback, value)``
1631 | translates ``value`` by using ``callback(term)`` to retrieve the
1632 | translation of terms.
1633 |
1634 | website_meta_keywords
1635 | Basic string field, can be length-limited, usually displayed as a
1636 | single-line string in clients.
1637 |
1638 | :param int size: the maximum size of values stored for that field
1639 |
1640 | :param translate: enable the translation of the field's values; use
1641 | ``translate=True`` to translate field values as a whole; ``translate``
1642 | may also be a callable such that ``translate(callback, value)``
1643 | translates ``value`` by using ``callback(term)`` to retrieve the
1644 | translation of terms.
1645 |
1646 | website_meta_title
1647 | Basic string field, can be length-limited, usually displayed as a
1648 | single-line string in clients.
1649 |
1650 | :param int size: the maximum size of values stored for that field
1651 |
1652 | :param translate: enable the translation of the field's values; use
1653 | ``translate=True`` to translate field values as a whole; ``translate``
1654 | may also be a callable such that ``translate(callback, value)``
1655 | translates ``value`` by using ``callback(term)`` to retrieve the
1656 | translation of terms.
1657 |
1658 | website_private
1659 |
1660 | website_published
1661 |
1662 | website_short_description
1663 | Very similar to :class:`~.Char` but used for longer contents, does not
1664 | have a size and usually displayed as a multiline text box.
1665 |
1666 | :param translate: enable the translation of the field's values; use
1667 | ``translate=True`` to translate field values as a whole; ``translate``
1668 | may also be a callable such that ``translate(callback, value)``
1669 | translates ``value`` by using ``callback(term)`` to retrieve the
1670 | translation of terms.
1671 |
1672 | website_url
1673 | Basic string field, can be length-limited, usually displayed as a
1674 | single-line string in clients.
1675 |
1676 | :param int size: the maximum size of values stored for that field
1677 |
1678 | :param translate: enable the translation of the field's values; use
1679 | ``translate=True`` to translate field values as a whole; ``translate``
1680 | may also be a callable such that ``translate(callback, value)``
1681 | translates ``value`` by using ``callback(term)`` to retrieve the
1682 | translation of terms.
1683 |
1684 | write_date
1685 |
1686 | write_uid
1687 | The value of such a field is a recordset of size 0 (no
1688 | record) or 1 (a single record).
1689 |
1690 | :param comodel_name: name of the target model (string)
1691 |
1692 | :param domain: an optional domain to set on candidate values on the
1693 | client side (domain or string)
1694 |
1695 | :param context: an optional context to use on the client side when
1696 | handling that field (dictionary)
1697 |
1698 | :param ondelete: what to do when the referred record is deleted;
1699 | possible values are: ``'set null'``, ``'restrict'``, ``'cascade'``
1700 |
1701 | :param auto_join: whether JOINs are generated upon search through that
1702 | field (boolean, by default ``False``)
1703 |
1704 | :param delegate: set it to ``True`` to make fields of the target model
1705 | accessible from the current model (corresponds to ``_inherits``)
1706 |
1707 | The attribute ``comodel_name`` is mandatory except in the case of related
1708 | fields or field extensions.
1709 |
1710 | zip
1711 | Basic string field, can be length-limited, usually displayed as a
1712 | single-line string in clients.
1713 |
1714 | :param int size: the maximum size of values stored for that field
1715 |
1716 | :param translate: enable the translation of the field's values; use
1717 | ``translate=True`` to translate field values as a whole; ``translate``
1718 | may also be a callable such that ``translate(callback, value)``
1719 | translates ``value`` by using ``callback(term)`` to retrieve the
1720 | translation of terms.
1721 |
1722 | ----------------------------------------------------------------------
1723 | Data and other attributes defined here:
1724 |
1725 | _columns = {'active': <openerp.osv.fields.boolean object>, 'afs_news':...
1726 |
1727 | _constraints = [(<unbound method Model._check_recursion>, 'You cannot ...
1728 |
1729 | _defaults = {'active': True, 'afs_news': False, 'category_id': <functi...
1730 |
1731 | _depends = {}
1732 |
1733 | _field_computed = {res.partner.has_unreconciled_entries: [res.partner....
1734 |
1735 | _field_inverses = <openerp.tools.misc.Collector object>
1736 |
1737 | _field_triggers = <openerp.tools.misc.Collector object>
1738 |
1739 | _fields = {'__last_update': res.partner.__last_update, 'active': res.p...
1740 |
1741 | _inherit_fields = {}
1742 |
1743 | _inherits = {}
1744 |
1745 | _log_access = True
1746 |
1747 | _model = res.partner
1748 |
1749 | _name = 'res.partner'
1750 |
1751 | _original_module = 'base'
1752 |
1753 | _proper_fields = set(['__last_update', 'active', 'afs_news', 'bank_acc...
1754 |
1755 | _rec_name = 'name'
1756 |
1757 | _register = True
1758 |
1759 | _sequence = 'res_partner_id_seq'
1760 |
1761 | _setup_done = True
1762 |
1763 | _sql_constraints = [('check_name', "CHECK( (type='contact' AND name IS...
1764 |
1765 | _table = 'res_partner'
1766 |
1767 | pool = <openerp.modules.registry.Registry object>
1768 | Model registry for a particular database.
1769 |
1770 | The registry is essentially a mapping between model names and model
1771 | instances. There is one registry instance per database.
1772 |
1773 | ----------------------------------------------------------------------
1774 | Methods inherited from openerp.addons.plustron_multi_shop.models.res_partner.PlustronResPartner:
1775 |
1776 | _get_attached_docs(self, *args, **kwargs)
1777 |
1778 | _get_default_image(self, *args, **kwargs)
1779 |
1780 | attachment_tree_view(self, *args, **kwargs)
1781 |
1782 | check_phonenumber(self, number)
1783 |
1784 | get_shop_code(self, *args, **kwargs)
1785 |
1786 | onchange_email(self)
1787 |
1788 | onchange_fax(self)
1789 |
1790 | onchange_mobile(self)
1791 |
1792 | onchange_phone(self)
1793 |
1794 | ----------------------------------------------------------------------
1795 | Data and other attributes inherited from openerp.addons.plustron_multi_shop.models.res_partner.PlustronResPartner:
1796 |
1797 | _inherit = 'res.partner'
1798 |
1799 | _local_constraints = []
1800 |
1801 | _local_sql_constraints = []
1802 |
1803 | _module = 'plustron_multi_shop'
1804 |
1805 | ----------------------------------------------------------------------
1806 | Methods inherited from openerp.addons.plustron_clients.models.plustron_clients.PlustronResPartner:
1807 |
1808 | _get_default_ref(self, *args, **kwargs)
1809 |
1810 | on_change_title(self)
1811 |
1812 | onchange_customer(self)
1813 |
1814 | ----------------------------------------------------------------------
1815 | Methods inherited from openerp.addons.project_timesheet.project_timesheet.res_partner:
1816 |
1817 | unlink(self, *args, **kwargs)
1818 |
1819 | ----------------------------------------------------------------------
1820 | Methods inherited from openerp.addons.project_issue.project_issue.res_partner:
1821 |
1822 | _issue_count(self, *args, **kwargs)
1823 |
1824 | ----------------------------------------------------------------------
1825 | Methods inherited from openerp.addons.crm_phone.crm_phone.ResPartner:
1826 |
1827 | _count_phonecalls(self, *args, **kwargs)
1828 |
1829 | ----------------------------------------------------------------------
1830 | Methods inherited from openerp.addons.crm_claim.crm_claim.res_partner:
1831 |
1832 | _claim_count(self, *args, **kwargs)
1833 |
1834 | ----------------------------------------------------------------------
1835 | Methods inherited from openerp.addons.sale.res_partner.res_partner:
1836 |
1837 | _sale_order_count(self, *args, **kwargs)
1838 |
1839 | ----------------------------------------------------------------------
1840 | Methods inherited from openerp.addons.project.res_partner.res_partner:
1841 |
1842 | _task_count(self, *args, **kwargs)
1843 |
1844 | ----------------------------------------------------------------------
1845 | Methods inherited from openerp.addons.payment.models.res_partner.res_partner:
1846 |
1847 | _compute_payment_method_count(self, *args, **kwargs)
1848 |
1849 | ----------------------------------------------------------------------
1850 | Methods inherited from openerp.addons.crm.res_partner.res_partner:
1851 |
1852 | _opportunity_meeting_count(self, *args, **kwargs)
1853 |
1854 | make_opportunity(self, *args, **kwargs)
1855 |
1856 | redirect_partner_form(self, *args, **kwargs)
1857 |
1858 | schedule_meeting(self, *args, **kwargs)
1859 |
1860 | ----------------------------------------------------------------------
1861 | Methods inherited from openerp.addons.base_vat.base_vat.res_partner:
1862 |
1863 | _construct_constraint_msg(self, *args, **kwargs)
1864 |
1865 | _ie_check_char(self, vat)
1866 |
1867 | _split_vat(self, vat)
1868 |
1869 | check_vat(self, *args, **kwargs)
1870 |
1871 | check_vat_ch(self, vat)
1872 | Check Switzerland VAT number.
1873 |
1874 | check_vat_ie(self, vat)
1875 | Temporary Ireland VAT validation to support the new format
1876 | introduced in January 2013 in Ireland, until upstream is fixed.
1877 | TODO: remove when fixed upstream
1878 |
1879 | check_vat_mx(self, vat)
1880 | Mexican VAT verification
1881 |
1882 | Verificar RFC México
1883 |
1884 | check_vat_no(self, vat)
1885 | Check Norway VAT number.See http://www.brreg.no/english/coordination/number.html
1886 |
1887 | check_vat_pe(self, vat)
1888 | # Peruvian VAT validation, contributed by Vauxoo
1889 |
1890 | check_vat_tr(self, vat)
1891 | # VAT validation in Turkey, contributed by # Levent Karakas @ Eska Yazilim A.S.
1892 |
1893 | simple_vat_check(self, *args, **kwargs)
1894 | Check the VAT number depending of the country.
1895 | http://sima-pc.com/nif.php
1896 |
1897 | vies_vat_check(self, *args, **kwargs)
1898 |
1899 | ----------------------------------------------------------------------
1900 | Data and other attributes inherited from openerp.addons.base_vat.base_vat.res_partner:
1901 |
1902 | _res_partner__check_vat_ch_re1 = <_sre.SRE_Pattern object>
1903 |
1904 | _res_partner__check_vat_ch_re2 = <_sre.SRE_Pattern object>
1905 |
1906 | _res_partner__check_vat_mx_re = <_sre.SRE_Pattern object>
1907 |
1908 | ----------------------------------------------------------------------
1909 | Methods inherited from openerp.addons.calendar.calendar.res_partner:
1910 |
1911 | _set_calendar_last_notif_ack(self, *args, **kwargs)
1912 |
1913 | get_attendee_detail(self, *args, **kwargs)
1914 | Return a list of tuple (id, name, status)
1915 | Used by web_calendar.js : Many2ManyAttendee
1916 |
1917 | ----------------------------------------------------------------------
1918 | Methods inherited from openerp.addons.account.models.partner.ResPartner:
1919 |
1920 | _asset_difference_search(self, *args, **kwargs)
1921 |
1922 | _commercial_fields(self, *args, **kwargs)
1923 |
1924 | _compute_bank_count(self, *args, **kwargs)
1925 |
1926 | _compute_has_unreconciled_entries(self, *args, **kwargs)
1927 |
1928 | _compute_issued_total(self, *args, **kwargs)
1929 | Returns the issued total as will be displayed on partner view
1930 |
1931 | _credit_debit_get(self, *args, **kwargs)
1932 |
1933 | _credit_search(self, *args, **kwargs)
1934 |
1935 | _debit_search(self, *args, **kwargs)
1936 |
1937 | _find_accounting_partner(self, partner)
1938 | Find the partner for which the accounting entries will be created
1939 |
1940 | _get_company_currency(self, *args, **kwargs)
1941 |
1942 | _invoice_total(self, *args, **kwargs)
1943 |
1944 | _journal_item_count(self, *args, **kwargs)
1945 |
1946 | get_followup_lines_domain(self, date, overdue_only=False, only_unblocked=False)
1947 |
1948 | mark_as_reconciled(self, *args, **kwargs)
1949 |
1950 | ----------------------------------------------------------------------
1951 | Data and other attributes inherited from openerp.addons.account.models.partner.ResPartner:
1952 |
1953 | _description = 'Partner'
1954 |
1955 | ----------------------------------------------------------------------
1956 | Methods inherited from openerp.addons.hr.res_partner.Partner:
1957 |
1958 | get_static_mention_suggestions(self, *args, **kwargs)
1959 | Extend the mail's static mention suggestions by adding the employees.
1960 |
1961 | ----------------------------------------------------------------------
1962 | Methods inherited from openerp.addons.auth_signup.res_users.res_partner:
1963 |
1964 | _get_signup_url(self, *args, **kwargs)
1965 | proxy for function field towards actual implementation
1966 |
1967 | _get_signup_url_for_action(self, *args, **kwargs)
1968 | generate a signup url for the given partner ids and action, possibly overriding
1969 | the url state components (menu_id, id, view_type)
1970 |
1971 | _get_signup_valid(self, *args, **kwargs)
1972 |
1973 | _signup_retrieve_partner(self, *args, **kwargs)
1974 | find the partner corresponding to a token, and possibly check its validity
1975 | :param token: the token to resolve
1976 | :param check_validity: if True, also check validity
1977 | :param raise_exception: if True, raise exception instead of returning False
1978 | :return: partner (browse record) or False (if raise_exception is False)
1979 |
1980 | action_signup_prepare(self, *args, **kwargs)
1981 |
1982 | signup_cancel(self, *args, **kwargs)
1983 |
1984 | signup_prepare(self, *args, **kwargs)
1985 | generate a new token for the partners with the given validity, if necessary
1986 | :param expiration: the expiration datetime of the token (string, optional)
1987 |
1988 | signup_retrieve_info(self, *args, **kwargs)
1989 | retrieve the user info about the token
1990 | :return: a dictionary with the user information:
1991 | - 'db': the name of the database
1992 | - 'token': the token, if token is valid
1993 | - 'name': the name of the partner, if token is valid
1994 | - 'login': the user login, if the user already exists
1995 | - 'email': the partner email, if the user does not exist
1996 |
1997 | ----------------------------------------------------------------------
1998 | Methods inherited from openerp.addons.website_partner.models.res_partner.WebsiteResPartner:
1999 |
2000 | _get_ids(self, *args, **kwargs)
2001 |
2002 | _get_private(self, *args, **kwargs)
2003 |
2004 | _search_private(self, *args, **kwargs)
2005 |
2006 | _set_private(self, *args, **kwargs)
2007 |
2008 | _website_url(self, *args, **kwargs)
2009 |
2010 | ----------------------------------------------------------------------
2011 | Methods inherited from openerp.addons.mail.models.res_partner.Partner:
2012 |
2013 | _notify(self, *args, **kwargs)
2014 |
2015 | _notify_by_chat(self, *args, **kwargs)
2016 | Broadcast the message to all the partner since
2017 |
2018 | _notify_by_email(self, *args, **kwargs)
2019 | Method to send email linked to notified messages. The recipients are
2020 | the recordset on which this method is called.
2021 |
2022 | _notify_prepare_email_values(self, *args, **kwargs)
2023 |
2024 | _notify_prepare_template_context(self, *args, **kwargs)
2025 |
2026 | _notify_send(self, *args, **kwargs)
2027 |
2028 | get_mention_suggestions(self, *args, **kwargs)
2029 | Return 'limit'-first partners' id, name and email such that the name or email matches a
2030 | 'search' string. Prioritize users, and then extend the research to all partners.
2031 |
2032 | get_needaction_count(self, *args, **kwargs)
2033 | compute the number of needaction of the current user
2034 |
2035 | message_get_default_recipients(self, *args, **kwargs)
2036 |
2037 | message_get_suggested_recipients(self, *args, **kwargs)
2038 |
2039 | ----------------------------------------------------------------------
2040 | Data and other attributes inherited from openerp.addons.mail.models.res_partner.Partner:
2041 |
2042 | _mail_flat_thread = False
2043 |
2044 | _mail_mass_mailing = 'Customers'
2045 |
2046 | ----------------------------------------------------------------------
2047 | Methods inherited from openerp.addons.website.models.website.res_partner:
2048 |
2049 | google_map_img(self, *args, **kwargs)
2050 |
2051 | google_map_link(self, *args, **kwargs)
2052 |
2053 | ----------------------------------------------------------------------
2054 | Methods inherited from openerp.addons.bus.models.res_partner.ResPartner:
2055 |
2056 | _compute_im_status(self, *args, **kwargs)
2057 |
2058 | im_search(self, *args, **kwargs)
2059 | Search partner with a name and return its id, name and im_status.
2060 | Note : the user must be logged
2061 | :param name : the partner name to search
2062 | :param limit : the limit of result to return
2063 |
2064 | ----------------------------------------------------------------------
2065 | Methods inherited from openerp.addons.base_phone.models.res_partner.ResPartner:
2066 |
2067 | name_get(self, *args, **kwargs)
2068 |
2069 | ----------------------------------------------------------------------
2070 | Data and other attributes inherited from openerp.addons.base_phone.models.res_partner.ResPartner:
2071 |
2072 | _phone_name_sequence = 10
2073 |
2074 | ----------------------------------------------------------------------
2075 | Methods inherited from openerp.addons.partner_firstname.models.ResPartner:
2076 |
2077 | _check_name(self, *args, **kwargs)
2078 | Ensure at least one name is set.
2079 |
2080 | _compute_name(self, *args, **kwargs)
2081 | Write the 'name' field according to splitted data.
2082 |
2083 | _get_computed_name(self, *args, **kwargs)
2084 | Compute the 'name' field according to splitted data.
2085 | You can override this method to change the order of lastname and
2086 | firstname the computed name
2087 |
2088 | _get_inverse_name(self, *args, **kwargs)
2089 | Try to revert the effect of :meth:`._compute_name`.
2090 |
2091 | - If the partner is a company, save it in the lastname.
2092 | - Otherwise, make a guess.
2093 |
2094 | This method can be easily overriden by other submodules.
2095 | You can also override this method to change the order of name's
2096 | attributes
2097 |
2098 | When this method is called, :attr:`~.name` already has unified and
2099 | trimmed whitespace.
2100 |
2101 | _install_partner_firstname(self, *args, **kwargs)
2102 | Save names correctly in the database.
2103 |
2104 | Before installing the module, field ``name`` contains all full names.
2105 | When installing it, this method parses those names and saves them
2106 | correctly into the database. This can be called later too if needed.
2107 |
2108 | _inverse_name(self, *args, **kwargs)
2109 |
2110 | _inverse_name_after_cleaning_whitespace(self, *args, **kwargs)
2111 | Clean whitespace in :attr:`~.name` and split it.
2112 |
2113 | Removes leading, trailing and duplicated whitespace.
2114 |
2115 | The splitting logic is stored separately in :meth:`~._inverse_name`, so
2116 | submodules can extend that method and get whitespace cleaning for free.
2117 |
2118 | _onchange_name(self, *args, **kwargs)
2119 | Ensure :attr:`~.name` is inverted in the UI.
2120 |
2121 | _onchange_subnames(self, *args, **kwargs)
2122 | Avoid recursion when the user changes one of these fields.
2123 |
2124 | This forces to skip the :attr:`~.name` inversion when the user is
2125 | setting it in a not-inverted way.
2126 |
2127 | ----------------------------------------------------------------------
2128 | Methods inherited from openerp.addons.base.res.res_partner.res_partner:
2129 |
2130 | _address_display(self, *args, **kwargs)
2131 |
2132 | _address_fields(self, *args, **kwargs)
2133 | Returns the list of address fields that are synced from the parent
2134 | when the `use_parent_address` flag is set.
2135 |
2136 | _clean_website(self, website)
2137 |
2138 | _commercial_partner_compute(self, *args, **kwargs)
2139 | Returns the partner that is considered the commercial
2140 | entity of this partner. The commercial entity holds the master data
2141 | for all commercial fields (see :py:meth:`~_commercial_fields`)
2142 |
2143 | _commercial_partner_id lambda self, *args, **kwargs
2144 | # indirections to avoid passing a copy of the overridable method when declaring the function field
2145 |
2146 | _commercial_sync_from_company(self, *args, **kwargs)
2147 | Handle sync of commercial fields when a new parent commercial entity is set,
2148 | as if they were related fields
2149 |
2150 | _commercial_sync_to_children(self, *args, **kwargs)
2151 | Handle sync of commercial fields to descendants
2152 |
2153 | _default_category(self, *args, **kwargs)
2154 |
2155 | _default_company(self, *args, **kwargs)
2156 |
2157 | _display_address(self, *args, **kwargs)
2158 | The purpose of this function is to build and return an address formatted accordingly to the
2159 | standards of the country where it belongs.
2160 |
2161 | :param address: browse record of the res.partner to format
2162 | :returns: the address formatted in a display that fit its country habits (or the default ones
2163 | if not country is specified)
2164 | :rtype: string
2165 |
2166 | _display_name lambda self, *args, **kwargs
2167 |
2168 | _display_name_compute(self, *args, **kwargs)
2169 |
2170 | _email_send(self, *args, **kwargs)
2171 |
2172 | _fields_sync(self, *args, **kwargs)
2173 | Sync commercial fields and address fields from company and to children after create/update,
2174 | just as if those were all modeled as fields.related to the parent
2175 |
2176 | _get_tz_offset(self, *args, **kwargs)
2177 |
2178 | _handle_first_contact_creation(self, *args, **kwargs)
2179 | On creation of first contact for a company (or root) that has no address, assume contact address
2180 | was meant to be company address
2181 |
2182 | _parse_partner_name(self, text, context=None)
2183 | Supported syntax:
2184 | - 'Raoul <raoul@grosbedon.fr>': will find name and email address
2185 | - otherwise: default, everything is set as the name
2186 |
2187 | _search(self, *args, **kwargs)
2188 | Override search() to always show inactive children when searching via ``child_of`` operator. The ORM will
2189 | always call search() with a simple domain of the form [('parent_id', 'in', [ids])].
2190 |
2191 | _update_fields_values(self, *args, **kwargs)
2192 | Returns dict of write() values for synchronizing ``fields``
2193 |
2194 | address_get(self, *args, **kwargs)
2195 | Find contacts/addresses of the right type(s) by doing a depth-first-search
2196 | through descendants within company boundaries (stop at entities flagged ``is_company``)
2197 | then continuing the search at the ancestors that are within the same company boundaries.
2198 | Defaults to partners of type ``'default'`` when the exact type is not found, or to the
2199 | provided partner itself if no type ``'default'`` is found either.
2200 |
2201 | copy(self, *args, **kwargs)
2202 |
2203 | create(self, *args, **kwargs)
2204 |
2205 | email_send(self, *args, **kwargs)
2206 |
2207 | fields_view_get(self, *args, **kwargs)
2208 |
2209 | find_or_create(self, *args, **kwargs)
2210 | Find a partner with the given ``email`` or use :py:method:`~.name_create`
2211 | to create one
2212 |
2213 | :param str email: email-like string, which should contain at least one email,
2214 | e.g. ``"Raoul Grosbedon <r.g@grosbedon.fr>"``
2215 |
2216 | main_partner(self, *args, **kwargs)
2217 | Return the main partner
2218 |
2219 | name_create(self, *args, **kwargs)
2220 | Override of orm's name_create method for partners. The purpose is
2221 | to handle some basic formats to create partners using the
2222 | name_create.
2223 | If only an email address is received and that the regex cannot find
2224 | a name, the name will have the email value.
2225 | If 'force_email' key in context: must find the email address.
2226 |
2227 | name_search(self, *args, **kwargs)
2228 |
2229 | on_change_company_type(self, *args, **kwargs)
2230 |
2231 | onchange_parent_id(self, *args, **kwargs)
2232 |
2233 | onchange_state(self, *args, **kwargs)
2234 |
2235 | open_commercial_entity(self, *args, **kwargs)
2236 | Utility method used to add an "Open Company" button in partner views
2237 |
2238 | open_parent(self, *args, **kwargs)
2239 | Utility method used to add an "Open Parent" button in partner views
2240 |
2241 | update_address(self, *args, **kwargs)
2242 |
2243 | view_header_get(self, *args, **kwargs)
2244 |
2245 | write(self, *args, **kwargs)
2246 |
2247 | ----------------------------------------------------------------------
2248 | Data and other attributes inherited from openerp.addons.base.res.res_partner.res_partner:
2249 |
2250 | _commercial_partner_store_triggers = {'res.partner': (<function <lambd...
2251 |
2252 | _display_name_store_triggers = {'res.partner': (<function <lambda>>, [...
2253 |
2254 | _order = 'display_name'
2255 |
2256 | ----------------------------------------------------------------------
2257 | Data and other attributes inherited from openerp.models.Model:
2258 |
2259 | _auto = True
2260 |
2261 | _transient = False
2262 |
2263 | ----------------------------------------------------------------------
2264 | Methods inherited from openerp.addons.mail.models.mail_thread.MailThread:
2265 |
2266 | _compute_is_follower(self, *args, **kwargs)
2267 |
2268 | _find_partner_from_emails(self, *args, **kwargs)
2269 | Utility method to find partners from email addresses. The rules are :
2270 | 1 - check in document (model | self, id) followers
2271 | 2 - try to find a matching partner that is also an user
2272 | 3 - try to find a matching partner
2273 | 4 - create a new one if force_create = True
2274 |
2275 | :param list emails: list of email addresses
2276 | :param string model: model to fetch related record; by default self
2277 | is used.
2278 | :param boolean check_followers: check in document followers
2279 | :param boolean force_create: create a new partner if not found
2280 |
2281 | _garbage_collect_attachments(self, *args, **kwargs)
2282 | Garbage collect lost mail attachments. Those are attachments
2283 | - linked to res_model 'mail.compose.message', the composer wizard
2284 | - with res_id 0, because they were created outside of an existing
2285 | wizard (typically user input through Chatter or reports
2286 | created on-the-fly by the templates)
2287 | - unused since at least one day (create_date and write_date)
2288 |
2289 | _generate_notification_token(self, *args, **kwargs)
2290 |
2291 | _get_followers(self, *args, **kwargs)
2292 |
2293 | _get_inbox_action_xml_id(self, *args, **kwargs)
2294 | When redirecting towards the Inbox, choose which action xml_id has
2295 | to be fetched. This method is meant to be inherited, at least in portal
2296 | because portal users have a different Inbox action than classic users.
2297 |
2298 | _get_message_needaction(self, *args, **kwargs)
2299 |
2300 | _get_message_unread(self, *args, **kwargs)
2301 |
2302 | _get_tracked_fields(self, *args, **kwargs)
2303 | Return a structure of tracked fields for the current model.
2304 | :param list updated_fields: modified field names
2305 | :return dict: a dict mapping field name to description, containing
2306 | always tracked fields and modified on_change fields
2307 |
2308 | _message_add_suggested_recipient(self, *args, **kwargs)
2309 | Called by message_get_suggested_recipients, to add a suggested
2310 | recipient in the result dictionary. The form is :
2311 | partner_id, partner_name<partner_email> or partner_name, reason
2312 |
2313 | _message_auto_subscribe_notify(self, *args, **kwargs)
2314 | Notify newly subscribed followers of the last posted message.
2315 | :param partner_ids : the list of partner to add as needaction partner of the last message
2316 | (This excludes the current partner)
2317 |
2318 | _message_extract_payload(self, message, save_original=False)
2319 | Extract body as HTML and attachments from the mail message
2320 |
2321 | _message_extract_payload_postprocess(self, message, body, attachments)
2322 | Perform some cleaning / postprocess in the body and attachments
2323 | extracted from the email. Note that this processing is specific to the
2324 | mail module, and should not contain security or generic html cleaning.
2325 | Indeed those aspects should be covered by html_email_clean and
2326 | html_sanitize methods located in tools.
2327 |
2328 | _message_find_partners(self, message, header_fields=['From'])
2329 | Find partners related to some header fields of the message.
2330 |
2331 | :param string message: an email.message instance
2332 |
2333 | _message_get_auto_subscribe_fields(self, *args, **kwargs)
2334 | Returns the list of relational fields linking to res.users that should
2335 | trigger an auto subscribe. The default list checks for the fields
2336 | - called 'user_id'
2337 | - linking to res.users
2338 | - with track_visibility set
2339 | In OpenERP V7, this is sufficent for all major addon such as opportunity,
2340 | project, issue, recruitment, sale.
2341 | Override this method if a custom behavior is needed about fields
2342 | that automatically subscribe users.
2343 |
2344 | _message_notification_recipients(self, *args, **kwargs)
2345 |
2346 | _message_preprocess_attachments(self, *args, **kwargs)
2347 | Preprocess attachments for mail_thread.message_post() or mail_mail.create().
2348 |
2349 | :param list attachments: list of attachment tuples in the form ``(name,content)``,
2350 | where content is NOT base64 encoded
2351 | :param list attachment_ids: a list of attachment ids, not in tomany command form
2352 | :param str attach_model: the model of the attachments parent record
2353 | :param integer attach_res_id: the id of the attachments parent record
2354 |
2355 | _message_track(self, *args, **kwargs)
2356 |
2357 | _needaction_domain_get(self, *args, **kwargs)
2358 |
2359 | _notification_get_recipient_groups(self, *args, **kwargs)
2360 | Give the categories of recipients for notification emails. As emails
2361 | are generated once for group of recipients to work in batch, the first
2362 | thing to do is to categorize them. The basic behavior is simply
2363 | to distinguish users from partners.
2364 |
2365 | Specific values :
2366 |
2367 | - button_access: used to display 'View Document' in email, if set
2368 | - button_follow: used to display 'Follow' in email, if set
2369 | - button unfollow: used to display 'Unfollow' in email, if set
2370 |
2371 | _notification_group_recipients(self, *args, **kwargs)
2372 | Given the categories of partners to emails in group_data, set the
2373 | right group for the recipients. The basic behavior is simply to
2374 | distinguish users from partners.
2375 |
2376 | Inherit this method to group recipients according to specific criterions
2377 | allowing to tune the notification email. Generally this will be based
2378 | on user groups (res.groups), but not necessarily.
2379 |
2380 | Example: having defined a group_hr_user entry, store HR users and
2381 | officers.
2382 |
2383 | _notification_link_helper(self, *args, **kwargs)
2384 |
2385 | _search_follower_channels(self, *args, **kwargs)
2386 | Search function for message_follower_ids
2387 |
2388 | Do not use with operator 'not in'. Use instead message_is_followers
2389 |
2390 | _search_follower_partners(self, *args, **kwargs)
2391 | Search function for message_follower_ids
2392 |
2393 | Do not use with operator 'not in'. Use instead message_is_followers
2394 |
2395 | _search_is_follower(self, *args, **kwargs)
2396 |
2397 | _search_message_needaction(self, *args, **kwargs)
2398 |
2399 | _track_subtype(self, *args, **kwargs)
2400 | Give the subtypes triggered by the changes on the record according
2401 | to values that have been updated.
2402 |
2403 | :param ids: list of a single ID, the ID of the record being modified
2404 | :type ids: singleton list
2405 | :param init_values: the original values of the record; only modified fields
2406 | are present in the dict
2407 | :type init_values: dict
2408 | :returns: a subtype xml_id or False if no subtype is trigerred
2409 |
2410 | check_mail_message_access(self, *args, **kwargs)
2411 | mail.message check permission rules for related document. This method is
2412 | meant to be inherited in order to implement addons-specific behavior.
2413 | A common behavior would be to allow creating messages when having read
2414 | access rule on the document, for portal document such as issues.
2415 |
2416 | copy_data(self, *args, **kwargs)
2417 |
2418 | get_empty_list_help(self, *args, **kwargs)
2419 | Override of BaseModel.get_empty_list_help() to generate an help message
2420 | that adds alias information.
2421 |
2422 | message_auto_subscribe(self, *args, **kwargs)
2423 | Handle auto subscription. Two methods for auto subscription exist:
2424 |
2425 | - tracked res.users relational fields, such as user_id fields. Those fields
2426 | must be relation fields toward a res.users record, and must have the
2427 | track_visilibity attribute set.
2428 | - using subtypes parent relationship: check if the current model being
2429 | modified has an header record (such as a project for tasks) whose followers
2430 | can be added as followers of the current records. Example of structure
2431 | with project and task:
2432 |
2433 | - st_project_1.parent_id = st_task_1
2434 | - st_project_1.res_model = 'project.project'
2435 | - st_project_1.relation_field = 'project_id'
2436 | - st_task_1.model = 'project.task'
2437 |
2438 | :param list updated_fields: list of updated fields to track
2439 | :param dict values: updated values; if None, the first record will be browsed
2440 | to get the values. Added after releasing 7.0, therefore
2441 | not merged with updated_fields argumment.
2442 |
2443 | message_capable_models(self, *args, **kwargs)
2444 | Used by the plugin addon, based for plugin_outlook and others.
2445 |
2446 | message_change_thread(self, *args, **kwargs)
2447 | Transfer the list of the mail thread messages from an model to another
2448 |
2449 | :param id : the old res_id of the mail.message
2450 | :param new_res_id : the new res_id of the mail.message
2451 | :param new_model : the name of the new model of the mail.message
2452 |
2453 | Example : my_lead.message_change_thread(my_project_issue)
2454 | will transfer the context of the thread of my_lead to my_project_issue
2455 |
2456 | message_get_email_values(self, *args, **kwargs)
2457 | Get specific notification email values to store on the notification
2458 | mail_mail. Void method, inherit it to add custom values.
2459 |
2460 | message_get_recipient_values(self, *args, **kwargs)
2461 | Get specific notification recipient values to store on the notification
2462 | mail_mail. Basic method just set the recipient partners as mail_mail
2463 | recipients. Inherit this method to add custom behavior like using
2464 | recipient email_to to bypass the recipint_ids heuristics in the
2465 | mail sending mechanism.
2466 |
2467 | message_get_reply_to(self, *args, **kwargs)
2468 | Returns the preferred reply-to email address that is basically the
2469 | alias of the document, if it exists. Override this method to implement
2470 | a custom behavior about reply-to for generated emails.
2471 |
2472 | message_mass_mailing_enabled(self)
2473 |
2474 | message_new(self, *args, **kwargs)
2475 | Called by ``message_process`` when a new message is received
2476 | for a given thread model, if the message did not belong to
2477 | an existing thread.
2478 | The default behavior is to create a new record of the corresponding
2479 | model (based on some very basic info extracted from the message).
2480 | Additional behavior may be implemented by overriding this method.
2481 |
2482 | :param dict msg_dict: a map containing the email details and
2483 | attachments. See ``message_process`` and
2484 | ``mail.message.parse`` for details.
2485 | :param dict custom_values: optional dictionary of additional
2486 | field values to pass to create()
2487 | when creating the new thread record.
2488 | Be careful, these values may override
2489 | any other values coming from the message.
2490 | :param dict context: if a ``thread_model`` value is present
2491 | in the context, its value will be used
2492 | to determine the model of the record
2493 | to create (instead of the current model).
2494 | :rtype: int
2495 | :return: the id of the newly created thread object
2496 |
2497 | message_parse(self, *args, **kwargs)
2498 | Parses a string or email.message.Message representing an
2499 | RFC-2822 email, and returns a generic dict holding the
2500 | message details.
2501 |
2502 | :param message: the message to parse
2503 | :type message: email.message.Message | string | unicode
2504 | :param bool save_original: whether the returned dict
2505 | should include an ``original`` attachment containing
2506 | the source of the message
2507 | :rtype: dict
2508 | :return: A dict with the following structure, where each
2509 | field may not be present if missing in original
2510 | message::
2511 |
2512 | { 'message_id': msg_id,
2513 | 'subject': subject,
2514 | 'from': from,
2515 | 'to': to,
2516 | 'cc': cc,
2517 | 'body': unified_body,
2518 | 'attachments': [('file1', 'bytes'),
2519 | ('file2', 'bytes')}
2520 | }
2521 |
2522 | message_partner_info_from_emails(self, *args, **kwargs)
2523 | Convert a list of emails into a list partner_ids and a list
2524 | new_partner_ids. The return value is non conventional because
2525 | it is meant to be used by the mail widget.
2526 |
2527 | :return dict: partner_ids and new_partner_ids
2528 |
2529 | message_post(self, *args, **kwargs)
2530 | Post a new message in an existing thread, returning the new
2531 | mail.message ID.
2532 | :param int thread_id: thread ID to post into, or list with one ID;
2533 | if False/0, mail.message model will also be set as False
2534 | :param str body: body of the message, usually raw HTML that will
2535 | be sanitized
2536 | :param str type: see mail_message.type field
2537 | :param str content_subtype:: if plaintext: convert body into html
2538 | :param int parent_id: handle reply to a previous message by adding the
2539 | parent partners to the message in case of private discussion
2540 | :param tuple(str,str) attachments or list id: list of attachment tuples in the form
2541 | ``(name,content)``, where content is NOT base64 encoded
2542 | Extra keyword arguments will be used as default column values for the
2543 | new mail.message record. Special cases:
2544 | - attachment_ids: supposed not attached to any document; attach them
2545 | to the related document. Should only be set by Chatter.
2546 | :return int: ID of newly created mail.message
2547 |
2548 | message_post_with_template(self, *args, **kwargs)
2549 | Helper method to send a mail with a template
2550 | :param template_id : the id of the template to render to create the body of the message
2551 | :param **kwargs : parameter to create a mail.compose.message woaerd (which inherit from mail.message)
2552 |
2553 | message_process(self, *args, **kwargs)
2554 | Process an incoming RFC2822 email message, relying on
2555 | ``mail.message.parse()`` for the parsing operation,
2556 | and ``message_route()`` to figure out the target model.
2557 |
2558 | Once the target model is known, its ``message_new`` method
2559 | is called with the new message (if the thread record did not exist)
2560 | or its ``message_update`` method (if it did).
2561 |
2562 | There is a special case where the target model is False: a reply
2563 | to a private message. In this case, we skip the message_new /
2564 | message_update step, to just post a new message using mail_thread
2565 | message_post.
2566 |
2567 | :param string model: the fallback model to use if the message
2568 | does not match any of the currently configured mail aliases
2569 | (may be None if a matching alias is supposed to be present)
2570 | :param message: source of the RFC2822 message
2571 | :type message: string or xmlrpclib.Binary
2572 | :type dict custom_values: optional dictionary of field values
2573 | to pass to ``message_new`` if a new record needs to be created.
2574 | Ignored if the thread record already exists, and also if a
2575 | matching mail.alias was found (aliases define their own defaults)
2576 | :param bool save_original: whether to keep a copy of the original
2577 | email source attached to the message after it is imported.
2578 | :param bool strip_attachments: whether to strip all attachments
2579 | before processing the message, in order to save some space.
2580 | :param int thread_id: optional ID of the record/thread from ``model``
2581 | to which this mail should be attached. When provided, this
2582 | overrides the automatic detection based on the message
2583 | headers.
2584 |
2585 | message_route(self, *args, **kwargs)
2586 | Attempt to figure out the correct target model, thread_id,
2587 | custom_values and user_id to use for an incoming message.
2588 | Multiple values may be returned, if a message had multiple
2589 | recipients matching existing mail.aliases, for example.
2590 |
2591 | The following heuristics are used, in this order:
2592 | 1. If the message replies to an existing thread_id, and
2593 | properly contains the thread model in the 'In-Reply-To'
2594 | header, use this model/thread_id pair, and ignore
2595 | custom_value (not needed as no creation will take place)
2596 | 2. Look for a mail.alias entry matching the message
2597 | recipient, and use the corresponding model, thread_id,
2598 | custom_values and user_id.
2599 | 3. Fallback to the ``model``, ``thread_id`` and ``custom_values``
2600 | provided.
2601 | 4. If all the above fails, raise an exception.
2602 |
2603 | :param string message: an email.message instance
2604 | :param dict message_dict: dictionary holding message variables
2605 | :param string model: the fallback model to use if the message
2606 | does not match any of the currently configured mail aliases
2607 | (may be None if a matching alias is supposed to be present)
2608 | :type dict custom_values: optional dictionary of default field values
2609 | to pass to ``message_new`` if a new record needs to be created.
2610 | Ignored if the thread record already exists, and also if a
2611 | matching mail.alias was found (aliases define their own defaults)
2612 | :param int thread_id: optional ID of the record/thread from ``model``
2613 | to which this mail should be attached. Only used if the message
2614 | does not reply to an existing thread and does not match any mail alias.
2615 | :return: list of [model, thread_id, custom_values, user_id, alias]
2616 |
2617 | :raises: ValueError, TypeError
2618 |
2619 | message_route_process(self, *args, **kwargs)
2620 |
2621 | message_route_verify(self, *args, **kwargs)
2622 | Verify route validity. Check and rules:
2623 | 1 - if thread_id -> check that document effectively exists; otherwise
2624 | fallback on a message_new by resetting thread_id
2625 | 2 - check that message_update exists if thread_id is set; or at least
2626 | that message_new exist
2627 | [ - find author_id if udpate_author is set]
2628 | 3 - if there is an alias, check alias_contact:
2629 | 'followers' and thread_id:
2630 | check on target document that the author is in the followers
2631 | 'followers' and alias_parent_thread_id:
2632 | check on alias parent document that the author is in the
2633 | followers
2634 | 'partners': check that author_id id set
2635 |
2636 | message_set_read(self, *args, **kwargs)
2637 |
2638 | message_subscribe(self, *args, **kwargs)
2639 | Add partners to the records followers.
2640 |
2641 | message_subscribe_users(self, *args, **kwargs)
2642 | Wrapper on message_subscribe, using users. If user_ids is not
2643 | provided, subscribe uid instead.
2644 |
2645 | message_track(self, *args, **kwargs)
2646 |
2647 | message_unsubscribe(self, *args, **kwargs)
2648 | Remove partners from the records followers.
2649 |
2650 | message_unsubscribe_users(self, *args, **kwargs)
2651 | Wrapper on message_subscribe, using users. If user_ids is not
2652 | provided, unsubscribe uid instead.
2653 |
2654 | message_update(self, *args, **kwargs)
2655 | Called by ``message_process`` when a new message is received
2656 | for an existing thread. The default behavior is to update the record
2657 | with update_vals taken from the incoming email.
2658 | Additional behavior may be implemented by overriding this
2659 | method.
2660 | :param dict msg_dict: a map containing the email details and
2661 | attachments. See ``message_process`` and
2662 | ``mail.message.parse()`` for details.
2663 | :param dict update_vals: a dict containing values to update records
2664 | given their ids; if the dict is None or is
2665 | void, no write operation is performed.
2666 |
2667 | ----------------------------------------------------------------------
2668 | Data and other attributes inherited from openerp.addons.mail.models.mail_thread.MailThread:
2669 |
2670 | _mail_post_access = 'write'
2671 |
2672 | ----------------------------------------------------------------------
2673 | Methods inherited from openerp.addons.website.models.website.website_published_mixin:
2674 |
2675 | _website_url_proxy lambda self, *a, **kw
2676 |
2677 | open_website_url(self, *args, **kwargs)
2678 |
2679 | website_publish_button(self, *args, **kwargs)
2680 |
2681 | ----------------------------------------------------------------------
2682 | Methods inherited from openerp.addons.web_live.abstract.AbstractLive:
2683 |
2684 | notify(self, *args, **kwargs)
2685 |
2686 | ----------------------------------------------------------------------
2687 | Methods inherited from openerp.models.BaseModel:
2688 |
2689 | _BaseModel__export_rows = __export_rows(self, *args, **kwargs)
2690 | Export fields of the records in ``self``.
2691 |
2692 | :param fields: list of lists of fields to traverse
2693 | :return: list of lists of corresponding values
2694 |
2695 | _BaseModel__export_xml_id = __export_xml_id(self)
2696 | Return a valid xml_id for the record ``self``.
2697 |
2698 | __add__(self, other)
2699 | Return the concatenation of two recordsets.
2700 |
2701 | __and__(self, other)
2702 | Return the intersection of two recordsets.
2703 | Note that recordset order is not preserved.
2704 |
2705 | __contains__(self, item)
2706 | Test whether ``item`` (record or field name) is an element of ``self``.
2707 | In the first case, the test is fully equivalent to::
2708 |
2709 | any(item == record for record in self)
2710 |
2711 | __eq__(self, other)
2712 | Test whether two recordsets are equivalent (up to reordering).
2713 |
2714 | __ge__(self, other)
2715 |
2716 | __getitem__(self, key)
2717 | If ``key`` is an integer or a slice, return the corresponding record
2718 | selection as an instance (attached to ``self.env``).
2719 | Otherwise read the field ``key`` of the first record in ``self``.
2720 |
2721 | Examples::
2722 |
2723 | inst = model.search(dom) # inst is a recordset
2724 | r4 = inst[3] # fourth record in inst
2725 | rs = inst[10:20] # subset of inst
2726 | nm = rs['name'] # name of first record in inst
2727 |
2728 | __gt__(self, other)
2729 |
2730 | __hash__(self)
2731 |
2732 | __init__(self, pool, cr)
2733 | Initialize a model and make it part of the given registry.
2734 |
2735 | - copy the stored fields' functions in the registry,
2736 | - retrieve custom fields and add them in the model,
2737 | - ensure there is a many2one for each _inherits'd parent,
2738 | - update the children's _columns,
2739 | - give a chance to each field to initialize itself.
2740 |
2741 | __int__(self)
2742 |
2743 | __iter__(self)
2744 | Return an iterator over ``self``.
2745 |
2746 | __le__(self, other)
2747 |
2748 | __len__(self)
2749 | Return the size of ``self``.
2750 |
2751 | __lt__(self, other)
2752 |
2753 | __ne__(self, other)
2754 |
2755 | __nonzero__(self)
2756 | Test whether ``self`` is nonempty.
2757 |
2758 | __or__(self, other)
2759 | Return the union of two recordsets.
2760 | Note that recordset order is not preserved.
2761 |
2762 | __repr__ = __str__(self)
2763 |
2764 | __setitem__(self, key, value)
2765 | Assign the field ``key`` to ``value`` in record ``self``.
2766 |
2767 | __str__(self)
2768 |
2769 | __sub__(self, other)
2770 | Return the recordset of all the records in ``self`` that are not in ``other``.
2771 |
2772 | __unicode__(self)
2773 |
2774 | _add_fake_fields(self, *args, **kwargs)
2775 |
2776 | _add_field(self, *args, **kwargs)
2777 | Add the given ``field`` under the given ``name`` in the class
2778 |
2779 | _add_inherited_fields(self, *args, **kwargs)
2780 | Determine inherited fields.
2781 |
2782 | _add_magic_fields(self, *args, **kwargs)
2783 | Introduce magic fields on the current class
2784 |
2785 | * id is a "normal" field (with a specific getter)
2786 | * create_uid, create_date, write_uid and write_date have become
2787 | "normal" fields
2788 | * $CONCURRENCY_CHECK_FIELD is a computed field with its computing
2789 | method defined dynamically. Uses ``str(datetime.datetime.utcnow())``
2790 | to get the same structure as the previous
2791 | ``(now() at time zone 'UTC')::timestamp``::
2792 |
2793 | # select (now() at time zone 'UTC')::timestamp;
2794 | timezone
2795 | ----------------------------
2796 | 2013-06-18 08:30:37.292809
2797 |
2798 | >>> str(datetime.datetime.utcnow())
2799 | '2013-06-18 08:31:32.821177'
2800 |
2801 | _add_manual_fields(self, *args, **kwargs)
2802 |
2803 | _add_missing_default_values(self, *args, **kwargs)
2804 |
2805 | _add_sql_constraints(self, *args, **kwargs)
2806 | Modify this model's database table constraints so they match the one in
2807 | _sql_constraints.
2808 |
2809 | _apply_ir_rules(self, *args, **kwargs)
2810 | Add what's missing in ``query`` to implement all appropriate ir.rules
2811 | (using the ``model_name``'s rules or the current model's rules if ``model_name`` is None)
2812 |
2813 | :param query: the current query object
2814 |
2815 | _auto_end(self, *args, **kwargs)
2816 | Create the foreign keys recorded by _auto_init.
2817 |
2818 | _auto_init(self, cr, context=None)
2819 | Call _field_create and, unless _auto is False:
2820 |
2821 | - create the corresponding table in database for the model,
2822 | - possibly add the parent columns in database,
2823 | - possibly add the columns 'create_uid', 'create_date', 'write_uid',
2824 | 'write_date' in database if _log_access is True (the default),
2825 | - report on database columns no more existing in _columns,
2826 | - remove no more existing not null constraints,
2827 | - alter existing database columns to match _columns,
2828 | - create database tables to match _columns,
2829 | - add database indices to match _columns,
2830 | - save in self._foreign_keys a list a foreign keys to create (see
2831 | _auto_end).
2832 |
2833 | _cache = <openerp.tools.func.lazy_property object>
2834 | _check_concurrency(self, *args, **kwargs)
2835 |
2836 | _check_m2m_recursion(self, *args, **kwargs)
2837 | Verifies that there is no loop in a hierarchical structure of records,
2838 | by following the parent relationship using the **parent** field until a loop
2839 | is detected or until a top-level record is found.
2840 |
2841 | :param cr: database cursor
2842 | :param uid: current user id
2843 | :param ids: list of ids of records to check
2844 | :param field_name: field to check
2845 | :return: **True** if the operation can proceed safely, or **False** if an infinite loop is detected.
2846 |
2847 | _check_qorder(self, word)
2848 |
2849 | _check_record_rules_result_count(self, *args, **kwargs)
2850 | Verify the returned rows after applying record rules matches
2851 | the length of ``ids``, and raise an appropriate exception if it does not.
2852 |
2853 | _check_recursion(self, *args, **kwargs)
2854 | Verifies that there is no loop in a hierarchical structure of records,
2855 | by following the parent relationship using the **parent** field until a loop
2856 | is detected or until a top-level record is found.
2857 |
2858 | :param cr: database cursor
2859 | :param uid: current user id
2860 | :param ids: list of ids of records to check
2861 | :param parent: optional parent field name (default: ``self._parent_name = parent_id``)
2862 | :return: **True** if the operation can proceed safely, or **False** if an infinite loop is detected.
2863 |
2864 | _check_removed_columns(self, *args, **kwargs)
2865 |
2866 | _check_selection_field_value(self, *args, **kwargs)
2867 | Check whether value is among the valid values for the given
2868 | selection/reference field, and raise an exception if not.
2869 |
2870 | _compute_display_name(self)
2871 |
2872 | _convert_records(self, *args, **kwargs)
2873 | Converts records from the source iterable (recursive dicts of
2874 | strings) into forms which can be written to the database (via
2875 | self.create or (ir.model.data)._update)
2876 |
2877 | :returns: a list of triplets of (id, xid, record)
2878 | :rtype: list((int|None, str|None, dict))
2879 |
2880 | _convert_to_cache(self, values, update=False, validate=True)
2881 | Convert the ``values`` dictionary into cached values.
2882 |
2883 | :param update: whether the conversion is made for updating ``self``;
2884 | this is necessary for interpreting the commands of *2many fields
2885 | :param validate: whether values must be checked
2886 |
2887 | _convert_to_write(self, values)
2888 | Convert the ``values`` dictionary into the format of :meth:`write`.
2889 |
2890 | _create(self, *args, **kwargs)
2891 |
2892 | _create_parent_columns(self, *args, **kwargs)
2893 |
2894 | _create_table(self, *args, **kwargs)
2895 |
2896 | _drop_constraint(self, *args, **kwargs)
2897 |
2898 | _execute_sql(self, *args, **kwargs)
2899 | Execute the SQL code from the _sql attribute (if any).
2900 |
2901 | _extract_records(self, *args, **kwargs)
2902 | Generates record dicts from the data sequence.
2903 |
2904 | The result is a generator of dicts mapping field names to raw
2905 | (unconverted, unvalidated) values.
2906 |
2907 | For relational fields, if sub-fields were provided the value will be
2908 | a list of sub-records
2909 |
2910 | The following sub-fields may be set on the record (by key):
2911 | * None is the name_get for the record (to use with name_create/name_search)
2912 | * "id" is the External ID for the record
2913 | * ".id" is the Database ID for the record
2914 |
2915 | _field_create(self, *args, **kwargs)
2916 | Create entries in ir_model_fields for all the model's fields.
2917 |
2918 | If necessary, also create an entry in ir_model, and if called from the
2919 | modules loading scheme (by receiving 'module' in the context), also
2920 | create entries in ir_model_data (for the model and the fields).
2921 |
2922 | - create an entry in ir_model (if there is not already one),
2923 | - create an entry in ir_model_data (if there is not already one, and if
2924 | 'module' is in the context),
2925 | - update ir_model_fields with the fields found in _columns
2926 | (TODO there is some redundancy as _columns is updated from
2927 | ir_model_fields in __init__).
2928 |
2929 | _generate_m2o_order_by(self, *args, **kwargs)
2930 | Add possibly missing JOIN to ``query`` and generate the ORDER BY clause for m2o fields,
2931 | either native m2o fields or function/related fields that are stored, including
2932 | intermediate JOINs for inheritance if required.
2933 |
2934 | :return: the qualified field name to use in an ORDER BY clause to sort by ``order_field``
2935 |
2936 | _generate_order_by(self, *args, **kwargs)
2937 | Attempt to construct an appropriate ORDER BY clause based on order_spec, which must be
2938 | a comma-separated list of valid field names, optionally followed by an ASC or DESC direction.
2939 |
2940 | :raise ValueError in case order_spec is malformed
2941 |
2942 | _generate_order_by_inner(self, *args, **kwargs)
2943 |
2944 | _generate_translated_field(self, *args, **kwargs)
2945 | Add possibly missing JOIN with translations table to ``query`` and
2946 | generate the expression for the translated field.
2947 |
2948 | :return: the qualified field name (or expression) to use for ``field``
2949 |
2950 | _get_default_calendar_view(self, *args, **kwargs)
2951 | Generates a default calendar view by trying to infer
2952 | calendar fields from a number of pre-set attribute names
2953 |
2954 | :param cr: database cursor
2955 | :param int user: user id
2956 | :param dict context: connection context
2957 | :returns: a calendar view
2958 | :rtype: etree._Element
2959 |
2960 | _get_default_form_view(self, *args, **kwargs)
2961 | Generates a default single-line form view using all fields
2962 | of the current model.
2963 |
2964 | :param cr: database cursor
2965 | :param int user: user id
2966 | :param dict context: connection context
2967 | :returns: a form view as an lxml document
2968 | :rtype: etree._Element
2969 |
2970 | _get_default_pivot_view(self, *args, **kwargs)
2971 |
2972 | _get_default_search_view(self, *args, **kwargs)
2973 | Generates a single-field search view, based on _rec_name.
2974 |
2975 | :param cr: database cursor
2976 | :param int user: user id
2977 | :param dict context: connection context
2978 | :returns: a tree view as an lxml document
2979 | :rtype: etree._Element
2980 |
2981 | _get_default_tree_view(self, *args, **kwargs)
2982 | Generates a single-field tree view, based on _rec_name.
2983 |
2984 | :param cr: database cursor
2985 | :param int user: user id
2986 | :param dict context: connection context
2987 | :returns: a tree view as an lxml document
2988 | :rtype: etree._Element
2989 |
2990 | _get_dirty(self)
2991 | Return the list of field names for which ``self`` is dirty.
2992 |
2993 | _get_external_ids(self, *args, **kwargs)
2994 | Retrieve the External ID(s) of any database record.
2995 |
2996 | **Synopsis**: ``_get_xml_ids(cr, uid, ids) -> { 'id': ['module.xml_id'] }``
2997 |
2998 | :return: map of ids to the list of their fully qualified External IDs
2999 | in the form ``module.key``, or an empty list when there's no External
3000 | ID for a record, e.g.::
3001 |
3002 | { 'id': ['module.ext_id', 'module.ext_id_bis'],
3003 | 'id2': [] }
3004 |
3005 | _get_xml_ids = _get_external_ids(self, *args, **kwargs)
3006 | Retrieve the External ID(s) of any database record.
3007 |
3008 | **Synopsis**: ``_get_xml_ids(cr, uid, ids) -> { 'id': ['module.xml_id'] }``
3009 |
3010 | :return: map of ids to the list of their fully qualified External IDs
3011 | in the form ``module.key``, or an empty list when there's no External
3012 | ID for a record, e.g.::
3013 |
3014 | { 'id': ['module.ext_id', 'module.ext_id_bis'],
3015 | 'id2': [] }
3016 |
3017 | _has_onchange(self, field, other_fields)
3018 | Return whether ``field`` should trigger an onchange event in the
3019 | presence of ``other_fields``.
3020 |
3021 | _in_cache_without(self, *args, **kwargs)
3022 | Make sure ``self`` is present in cache (for prefetching), and return
3023 | the records of model ``self`` in cache that have no value for ``field``
3024 | (:class:`Field` instance).
3025 |
3026 | _inherits_check(self, *args, **kwargs)
3027 |
3028 | _inherits_join_add(self, current_model, parent_model_name, query)
3029 | Add missing table SELECT and JOIN clause to ``query`` for reaching the parent table (no duplicates)
3030 | :param current_model: current model object
3031 | :param parent_model_name: name of the parent model for which the clauses should be added
3032 | :param query: query object on which the JOIN should be added
3033 |
3034 | _inherits_join_calc(self, *args, **kwargs)
3035 | Adds missing table select and join clause(s) to ``query`` for reaching
3036 | the field coming from an '_inherits' parent table (no duplicates).
3037 |
3038 | :param alias: name of the initial SQL alias
3039 | :param field: name of inherited field to reach
3040 | :param query: query object on which the JOIN should be added
3041 | :return: qualified name of field, to be used in SELECT clause
3042 |
3043 | _is_an_ordinary_table(self, *args, **kwargs)
3044 |
3045 | _is_dirty(self)
3046 | Return whether any record in ``self`` is dirty.
3047 |
3048 | _m2m_raise_or_create_relation(self, *args, **kwargs)
3049 | Create the table for the relation if necessary.
3050 | Return ``True`` if the relation had to be created.
3051 |
3052 | _m2o_add_foreign_key_checked(self, source_field, dest_model, ondelete)
3053 | # checked version: for direct m2o starting from ``self``
3054 |
3055 | _m2o_add_foreign_key_unchecked(self, source_table, source_field, dest_model, ondelete)
3056 | # unchecked version: for custom cases, such as m2m relationships
3057 |
3058 | _m2o_fix_foreign_key(self, *args, **kwargs)
3059 |
3060 | _mapped_cache(self, name_seq)
3061 | Same as `~.mapped`, but ``name_seq`` is a dot-separated sequence of
3062 | field names, and only cached values are used.
3063 |
3064 | _mapped_func(self, func)
3065 | Apply function ``func`` on all records in ``self``, and return the
3066 | result as a list or a recordset (if ``func`` returns recordsets).
3067 |
3068 | _name_search(self, *args, **kwargs)
3069 |
3070 | _o2m_raise_on_missing_reference(self, *args, **kwargs)
3071 |
3072 | _onchange_eval(self, field_name, onchange, result)
3073 | Apply onchange method(s) for field ``field_name`` with spec ``onchange``
3074 | on record ``self``. Value assignments are applied on ``self``, while
3075 | domain and warning messages are put in dictionary ``result``.
3076 |
3077 | _onchange_spec(self, *args, **kwargs)
3078 | Return the onchange spec from a view description; if not given, the
3079 | result of ``self.fields_view_get()`` is used.
3080 |
3081 | _parent_columns_exist(self, *args, **kwargs)
3082 |
3083 | _parent_store_compute(self, *args, **kwargs)
3084 |
3085 | _pop_field(self, *args, **kwargs)
3086 | Remove the field with the given ``name`` from the model.
3087 | This method should only be used for manual fields.
3088 |
3089 | _prefetch_field(self, *args, **kwargs)
3090 | Read from the database in order to fetch ``field`` (:class:`Field`
3091 | instance) for ``self`` in cache.
3092 |
3093 | _prepare_setup(self, *args, **kwargs)
3094 | Prepare the setup of the model.
3095 |
3096 | _read_from_database(self, *args, **kwargs)
3097 | Read the given fields of the records in ``self`` from the database,
3098 | and store them in cache. Access errors are also stored in cache.
3099 |
3100 | :param field_names: list of column names of model ``self``; all those
3101 | fields are guaranteed to be read
3102 | :param inherited_field_names: list of column names from parent
3103 | models; some of those fields may not be read
3104 |
3105 | _read_group_fill_results(self, *args, **kwargs)
3106 | Helper method for filling in empty groups for all possible values of
3107 | the field being grouped by
3108 |
3109 | _read_group_format_result(self, data, annotated_groupbys, groupby, groupby_dict, domain, context)
3110 | Helper method to format the data contained in the dictionary data by
3111 | adding the domain corresponding to its values, the groupbys in the
3112 | context and by properly formatting the date/datetime values.
3113 |
3114 | _read_group_get_domain(self, groupby, value)
3115 | Helper method to construct the domain corresponding to a groupby and
3116 | a given value. This is mostly relevant for date/datetime.
3117 |
3118 | _read_group_prepare(self, *args, **kwargs)
3119 | Prepares the GROUP BY and ORDER BY terms for the read_group method. Adds the missing JOIN clause
3120 | to the query if order should be computed against m2o field.
3121 | :param orderby: the orderby definition in the form "%(field)s %(order)s"
3122 | :param aggregated_fields: list of aggregated fields in the query
3123 | :param annotated_groupbys: list of dictionaries returned by _read_group_process_groupby
3124 | These dictionaries contains the qualified name of each groupby
3125 | (fully qualified SQL name for the corresponding field),
3126 | and the (non raw) field name.
3127 | :param osv.Query query: the query under construction
3128 | :return: (groupby_terms, orderby_terms)
3129 |
3130 | _read_group_prepare_data(self, key, value, groupby_dict, context)
3131 | Helper method to sanitize the data received by read_group. The None
3132 | values are converted to False, and the date/datetime are formatted,
3133 | and corrected according to the timezones.
3134 |
3135 | _read_group_process_groupby(self, *args, **kwargs)
3136 | Helper method to collect important information about groupbys: raw
3137 | field name, type, time information, qualified name, ...
3138 |
3139 | _rec_name_fallback(self, *args, **kwargs)
3140 |
3141 | _recompute_check(self, field)
3142 | If ``field`` must be recomputed on some record in ``self``, return the
3143 | corresponding records that must be recomputed.
3144 |
3145 | _recompute_done(self, field)
3146 | Mark ``field`` as recomputed.
3147 |
3148 | _recompute_todo(self, field)
3149 | Mark ``field`` to be recomputed.
3150 |
3151 | _register_hook(self, *args, **kwargs)
3152 | stuff to do right after the registry is built
3153 |
3154 | _save_constraint(self, *args, **kwargs)
3155 | Record the creation of a constraint for this model, to make it possible
3156 | to delete it later when the module is uninstalled. Type can be either
3157 | 'f' or 'u' depending on the constraint being a foreign key or not.
3158 |
3159 | _save_relation_table(self, *args, **kwargs)
3160 | Record the creation of a many2many for this model, to make it possible
3161 | to delete it later when the module is uninstalled.
3162 |
3163 | _select_column_data(self, *args, **kwargs)
3164 |
3165 | _set_default_value_on_column(self, *args, **kwargs)
3166 |
3167 | _set_dirty(self, field_name)
3168 | Mark the records in ``self`` as dirty for the given ``field_name``.
3169 |
3170 | _setup_base(self, *args, **kwargs)
3171 | Determine the inherited and custom fields of the model.
3172 |
3173 | _setup_complete(self, *args, **kwargs)
3174 | Setup recomputation triggers, and complete the model setup.
3175 |
3176 | _setup_fields(self, *args, **kwargs)
3177 | Setup the fields, except for recomputation triggers.
3178 |
3179 | _store_get_values(self, *args, **kwargs)
3180 | Returns an ordered list of fields.function to call due to
3181 | an update operation on ``fields`` of records with ``ids``,
3182 | obtained by calling the 'store' triggers of these fields,
3183 | as setup by their 'store' attribute.
3184 |
3185 | :return: [(priority, model_name, [record_ids,], [function_fields,])]
3186 |
3187 | _store_set_values(self, *args, **kwargs)
3188 | Calls the fields.function's "implementation function" for all ``fields``, on records with ``ids`` (taking care of
3189 | respecting ``multi`` attributes), and stores the resulting values in the database directly.
3190 |
3191 | _table_exist(self, *args, **kwargs)
3192 |
3193 | _transient_clean_old_rows(self, *args, **kwargs)
3194 |
3195 | _transient_clean_rows_older_than(self, *args, **kwargs)
3196 |
3197 | _transient_vacuum(self, *args, **kwargs)
3198 | Clean the transient records.
3199 |
3200 | This unlinks old records from the transient model tables whenever the
3201 | "_transient_max_count" or "_max_age" conditions (if any) are reached.
3202 | Actual cleaning will happen only once every "_transient_check_time" calls.
3203 | This means this method can be called frequently called (e.g. whenever
3204 | a new record is created).
3205 | Example with both max_hours and max_count active:
3206 | Suppose max_hours = 0.2 (e.g. 12 minutes), max_count = 20, there are 55 rows in the
3207 | table, 10 created/changed in the last 5 minutes, an additional 12 created/changed between
3208 | 5 and 10 minutes ago, the rest created/changed more then 12 minutes ago.
3209 | - age based vacuum will leave the 22 rows created/changed in the last 12 minutes
3210 | - count based vacuum will wipe out another 12 rows. Not just 2, otherwise each addition
3211 | would immediately cause the maximum to be reached again.
3212 | - the 10 rows that have been created/changed the last 5 minutes will NOT be deleted
3213 |
3214 | _update_store(self, *args, **kwargs)
3215 |
3216 | _validate_fields(self, *args, **kwargs)
3217 |
3218 | _view_look_dom_arch(self, *args, **kwargs)
3219 |
3220 | _where_calc(self, *args, **kwargs)
3221 | Computes the WHERE clause needed to implement an OpenERP domain.
3222 | :param domain: the domain to compute
3223 | :type domain: list
3224 | :param active_test: whether the default filtering of records with ``active``
3225 | field set to ``False`` should be applied.
3226 | :return: the query expressing the given domain as provided in domain
3227 | :rtype: osv.query.Query
3228 |
3229 | _write(self, *args, **kwargs)
3230 |
3231 | browse(self, *args, **kwargs)
3232 | browse([ids]) -> records
3233 |
3234 | Returns a recordset for the ids provided as parameter in the current
3235 | environment.
3236 |
3237 | Can take no ids, a single id or a sequence of ids.
3238 |
3239 | check_access_rights(self, *args, **kwargs)
3240 | Verifies that the operation given by ``operation`` is allowed for the user
3241 | according to the access rights.
3242 |
3243 | check_access_rule(self, *args, **kwargs)
3244 | Verifies that the operation given by ``operation`` is allowed for the user
3245 | according to ir.rules.
3246 |
3247 | :param operation: one of ``write``, ``unlink``
3248 | :raise UserError: * if current ir.rules do not permit this operation.
3249 | :return: None if the operation is allowed
3250 |
3251 | check_access_rule_all(self, *args, **kwargs)
3252 | Verifies that the operation given by ``operations`` is allowed for the
3253 | user according to ir.rules.
3254 |
3255 | If ``operations`` is empty, it returns the result for all actions.
3256 |
3257 | :param operation: a list of ``read``, ``create``, ``write``, ``unlink``
3258 | :return: {operation: access} (access is a boolean)
3259 |
3260 | check_field(self, *args, **kwargs)
3261 |
3262 | check_field_access_rights(self, *args, **kwargs)
3263 | Check the user access rights on the given fields. This raises Access
3264 | Denied if the user does not have the rights. Otherwise it returns the
3265 | fields (as is if the fields is not falsy, or the readable/writable
3266 | fields if fields is falsy).
3267 |
3268 | check_recursion(self, *args, **kwargs)
3269 |
3270 | clear_caches(self)
3271 | Clear the caches
3272 |
3273 | This clears the caches associated to methods decorated with
3274 | ``tools.ormcache`` or ``tools.ormcache_multi``.
3275 |
3276 | compute_concurrency_field(self, *args, **kwargs)
3277 |
3278 | compute_concurrency_field_with_access(self, *args, **kwargs)
3279 |
3280 | copy_translations(self, *args, **kwargs)
3281 |
3282 | create_workflow(self, *args, **kwargs)
3283 | Create a workflow instance for each given record IDs.
3284 |
3285 | default_get(self, *args, **kwargs)
3286 | default_get(fields) -> default_values
3287 |
3288 | Return default values for the fields in ``fields_list``. Default
3289 | values are determined by the context, user defaults, and the model
3290 | itself.
3291 |
3292 | :param fields_list: a list of field names
3293 | :return: a dictionary mapping each field name to its corresponding
3294 | default value, if it has one.
3295 |
3296 | delete_workflow(self, *args, **kwargs)
3297 | Delete the workflow instances bound to the given record IDs.
3298 |
3299 | distinct_field_get(self, *args, **kwargs)
3300 |
3301 | ensure_one(self)
3302 | Verifies that the current recorset holds a single record. Raises
3303 | an exception otherwise.
3304 |
3305 | exists(self, *args, **kwargs)
3306 | exists() -> records
3307 |
3308 | Returns the subset of records in ``self`` that exist, and marks deleted
3309 | records as such in cache. It can be used as a test on records::
3310 |
3311 | if record.exists():
3312 | ...
3313 |
3314 | By convention, new records are returned as existing.
3315 |
3316 | export_data(self, *args, **kwargs)
3317 | Export fields for selected objects
3318 |
3319 | :param fields_to_export: list of fields
3320 | :param raw_data: True to return value in native Python type
3321 | :rtype: dictionary with a *datas* matrix
3322 |
3323 | This method is used when exporting data via client menu
3324 |
3325 | fields_get(self, *args, **kwargs)
3326 | fields_get([fields][, attributes])
3327 |
3328 | Return the definition of each field.
3329 |
3330 | The returned value is a dictionary (indiced by field name) of
3331 | dictionaries. The _inherits'd fields are included. The string, help,
3332 | and selection (if present) attributes are translated.
3333 |
3334 | :param allfields: list of fields to document, all if empty or not provided
3335 | :param attributes: list of description attributes to return for each field, all if empty or not provided
3336 |
3337 | fields_get_keys(self, *args, **kwargs)
3338 |
3339 | filtered(self, func)
3340 | Select the records in ``self`` such that ``func(rec)`` is true, and
3341 | return them as a recordset.
3342 |
3343 | :param func: a function or a dot-separated sequence of field names
3344 |
3345 | get_access_action(self, *args, **kwargs)
3346 | Return an action to open the document. This method is meant to be
3347 | overridden in addons that want to give specific access to the document.
3348 | By default it opens the formview of the document.
3349 |
3350 | :param int id: id of the document to open
3351 |
3352 | get_external_id(self, *args, **kwargs)
3353 | Retrieve the External ID of any database record, if there
3354 | is one. This method works as a possible implementation
3355 | for a function field, to be able to add it to any
3356 | model object easily, referencing it as ``Model.get_external_id``.
3357 |
3358 | When multiple External IDs exist for a record, only one
3359 | of them is returned (randomly).
3360 |
3361 | :return: map of ids to their fully qualified XML ID,
3362 | defaulting to an empty string when there's none
3363 | (to be usable as a function field),
3364 | e.g.::
3365 |
3366 | { 'id': 'module.ext_id',
3367 | 'id2': '' }
3368 |
3369 | get_formview_action(self, *args, **kwargs)
3370 | Return an action to open the document. This method is meant to be
3371 | overridden in addons that want to give specific view ids for example.
3372 |
3373 | :param int id: id of the document to open
3374 |
3375 | get_formview_id(self, *args, **kwargs)
3376 | Return an view id to open the document with. This method is meant to be
3377 | overridden in addons that want to give specific view ids for example.
3378 |
3379 | :param int id: id of the document to open
3380 |
3381 | get_metadata(self, *args, **kwargs)
3382 | Returns some metadata about the given records.
3383 |
3384 | :return: list of ownership dictionaries for each requested record
3385 | :rtype: list of dictionaries with the following keys:
3386 |
3387 | * id: object id
3388 | * create_uid: user who created the record
3389 | * create_date: date when the record was created
3390 | * write_uid: last user who changed the record
3391 | * write_date: date of the last change to the record
3392 | * xmlid: XML ID to use to refer to this record (if there is one), in format ``module.name``
3393 | * noupdate: A boolean telling if the record will be updated or not
3394 |
3395 | get_xml_id = get_external_id(self, *args, **kwargs)
3396 | Retrieve the External ID of any database record, if there
3397 | is one. This method works as a possible implementation
3398 | for a function field, to be able to add it to any
3399 | model object easily, referencing it as ``Model.get_external_id``.
3400 |
3401 | When multiple External IDs exist for a record, only one
3402 | of them is returned (randomly).
3403 |
3404 | :return: map of ids to their fully qualified XML ID,
3405 | defaulting to an empty string when there's none
3406 | (to be usable as a function field),
3407 | e.g.::
3408 |
3409 | { 'id': 'module.ext_id',
3410 | 'id2': '' }
3411 |
3412 | import_data(self, *args, **kwargs)
3413 | .. deprecated:: 7.0
3414 | Use :meth:`~load` instead
3415 |
3416 | Import given data in given module
3417 |
3418 | This method is used when importing data via client menu.
3419 |
3420 | Example of fields to import for a sale.order::
3421 |
3422 | .id, (=database_id)
3423 | partner_id, (=name_search)
3424 | order_line/.id, (=database_id)
3425 | order_line/name,
3426 | order_line/product_id/id, (=xml id)
3427 | order_line/price_unit,
3428 | order_line/product_uom_qty,
3429 | order_line/product_uom/id (=xml_id)
3430 |
3431 | This method returns a 4-tuple with the following structure::
3432 |
3433 | (return_code, errored_resource, error_message, unused)
3434 |
3435 | * The first item is a return code, it is ``-1`` in case of
3436 | import error, or the last imported row number in case of success
3437 | * The second item contains the record data dict that failed to import
3438 | in case of error, otherwise it's 0
3439 | * The third item contains an error message string in case of error,
3440 | otherwise it's 0
3441 | * The last item is currently unused, with no specific semantics
3442 |
3443 | :param fields: list of fields to import
3444 | :param datas: data to import
3445 | :param mode: 'init' or 'update' for record creation
3446 | :param current_module: module name
3447 | :param noupdate: flag for record creation
3448 | :param filename: optional file to store partial import state for recovery
3449 | :returns: 4-tuple in the form (return_code, errored_resource, error_message, unused)
3450 | :rtype: (int, dict or 0, str or 0, str or 0)
3451 |
3452 | invalidate_cache(self, *args, **kwargs)
3453 | Invalidate the record caches after some records have been modified.
3454 | If both ``fnames`` and ``ids`` are ``None``, the whole cache is cleared.
3455 |
3456 | :param fnames: the list of modified fields, or ``None`` for all fields
3457 | :param ids: the list of modified record ids, or ``None`` for all
3458 |
3459 | load(self, *args, **kwargs)
3460 | Attempts to load the data matrix, and returns a list of ids (or
3461 | ``False`` if there was an error and no id could be generated) and a
3462 | list of messages.
3463 |
3464 | The ids are those of the records created and saved (in database), in
3465 | the same order they were extracted from the file. They can be passed
3466 | directly to :meth:`~read`
3467 |
3468 | :param fields: list of fields to import, at the same index as the corresponding data
3469 | :type fields: list(str)
3470 | :param data: row-major matrix of data to import
3471 | :type data: list(list(str))
3472 | :param dict context:
3473 | :returns: {ids: list(int)|False, messages: [Message]}
3474 |
3475 | mapped(self, func)
3476 | Apply ``func`` on all records in ``self``, and return the result as a
3477 | list or a recordset (if ``func`` return recordsets). In the latter
3478 | case, the order of the returned recordset is arbitrary.
3479 |
3480 | :param func: a function or a dot-separated sequence of field names
3481 |
3482 | modified(self, *args, **kwargs)
3483 | Notify that fields have been modified on ``self``. This invalidates
3484 | the cache, and prepares the recomputation of stored function fields
3485 | (new-style fields only).
3486 |
3487 | :param fnames: iterable of field names that have been modified on
3488 | records ``self``
3489 |
3490 | new(self, *args, **kwargs)
3491 | new([values]) -> record
3492 |
3493 | Return a new record instance attached to the current environment and
3494 | initialized with the provided ``value``. The record is *not* created
3495 | in database, it only exists in memory.
3496 |
3497 | onchange(self, *args, **kwargs)
3498 | Perform an onchange on the given field.
3499 |
3500 | :param values: dictionary mapping field names to values, giving the
3501 | current state of modification
3502 | :param field_name: name of the modified field, or list of field
3503 | names (in view order), or False
3504 | :param field_onchange: dictionary mapping field names to their
3505 | on_change attribute
3506 |
3507 | print_report(self, *args, **kwargs)
3508 | Render the report ``name`` for the given IDs. The report must be defined
3509 | for this model, not another.
3510 |
3511 | read(self, *args, **kwargs)
3512 | read([fields])
3513 |
3514 | Reads the requested fields for the records in ``self``, low-level/RPC
3515 | method. In Python code, prefer :meth:`~.browse`.
3516 |
3517 | :param fields: list of field names to return (default is all fields)
3518 | :return: a list of dictionaries mapping field names to their values,
3519 | with one dictionary per record
3520 | :raise AccessError: if user has no read rights on some of the given
3521 | records
3522 |
3523 | read_group(self, *args, **kwargs)
3524 | Get the list of records in list view grouped by the given ``groupby`` fields
3525 |
3526 | :param cr: database cursor
3527 | :param uid: current user id
3528 | :param domain: list specifying search criteria [['field_name', 'operator', 'value'], ...]
3529 | :param list fields: list of fields present in the list view specified on the object
3530 | :param list groupby: list of groupby descriptions by which the records will be grouped.
3531 | A groupby description is either a field (then it will be grouped by that field)
3532 | or a string 'field:groupby_function'. Right now, the only functions supported
3533 | are 'day', 'week', 'month', 'quarter' or 'year', and they only make sense for
3534 | date/datetime fields.
3535 | :param int offset: optional number of records to skip
3536 | :param int limit: optional max number of records to return
3537 | :param dict context: context arguments, like lang, time zone.
3538 | :param list orderby: optional ``order by`` specification, for
3539 | overriding the natural sort ordering of the
3540 | groups, see also :py:meth:`~osv.osv.osv.search`
3541 | (supported only for many2one fields currently)
3542 | :param bool lazy: if true, the results are only grouped by the first groupby and the
3543 | remaining groupbys are put in the __context key. If false, all the groupbys are
3544 | done in one call.
3545 | :return: list of dictionaries(one dictionary for each record) containing:
3546 |
3547 | * the values of fields grouped by the fields in ``groupby`` argument
3548 | * __domain: list of tuples specifying the search criteria
3549 | * __context: dictionary with argument like ``groupby``
3550 | :rtype: [{'field_name_1': value, ...]
3551 | :raise AccessError: * if user has no read rights on the requested object
3552 | * if user tries to bypass access rules for read on the requested object
3553 |
3554 | recompute(self, *args, **kwargs)
3555 | Recompute stored function fields. The fields and records to
3556 | recompute have been determined by method :meth:`modified`.
3557 |
3558 | redirect_workflow(self, *args, **kwargs)
3559 | Rebind the workflow instance bound to the given 'old' record IDs to
3560 | the given 'new' IDs. (``old_new_ids`` is a list of pairs ``(old, new)``.
3561 |
3562 | refresh(self, *args, **kwargs)
3563 | Clear the records cache.
3564 |
3565 | .. deprecated:: 8.0
3566 | The record cache is automatically invalidated.
3567 |
3568 | resolve_2many_commands(self, *args, **kwargs)
3569 | Serializes one2many and many2many commands into record dictionaries
3570 | (as if all the records came from the database via a read()). This
3571 | method is aimed at onchange methods on one2many and many2many fields.
3572 |
3573 | Because commands might be creation commands, not all record dicts
3574 | will contain an ``id`` field. Commands matching an existing record
3575 | will have an ``id``.
3576 |
3577 | :param field_name: name of the one2many or many2many field matching the commands
3578 | :type field_name: str
3579 | :param commands: one2many or many2many commands to execute on ``field_name``
3580 | :type commands: list((int|False, int|False, dict|False))
3581 | :param fields: list of fields to read from the database, when applicable
3582 | :type fields: list(str)
3583 | :returns: records in a shape similar to that returned by ``read()``
3584 | (except records may be missing the ``id`` field if they don't exist in db)
3585 | :rtype: list(dict)
3586 |
3587 | resolve_o2m_commands_to_record_dicts = resolve_2many_commands(self, *args, **kwargs)
3588 | Serializes one2many and many2many commands into record dictionaries
3589 | (as if all the records came from the database via a read()). This
3590 | method is aimed at onchange methods on one2many and many2many fields.
3591 |
3592 | Because commands might be creation commands, not all record dicts
3593 | will contain an ``id`` field. Commands matching an existing record
3594 | will have an ``id``.
3595 |
3596 | :param field_name: name of the one2many or many2many field matching the commands
3597 | :type field_name: str
3598 | :param commands: one2many or many2many commands to execute on ``field_name``
3599 | :type commands: list((int|False, int|False, dict|False))
3600 | :param fields: list of fields to read from the database, when applicable
3601 | :type fields: list(str)
3602 | :returns: records in a shape similar to that returned by ``read()``
3603 | (except records may be missing the ``id`` field if they don't exist in db)
3604 | :rtype: list(dict)
3605 |
3606 | search(self, *args, **kwargs)
3607 | search(args[, offset=0][, limit=None][, order=None][, count=False])
3608 |
3609 | Searches for records based on the ``args``
3610 | :ref:`search domain <reference/orm/domains>`.
3611 |
3612 | :param args: :ref:`A search domain <reference/orm/domains>`. Use an empty
3613 | list to match all records.
3614 | :param int offset: number of results to ignore (default: none)
3615 | :param int limit: maximum number of records to return (default: all)
3616 | :param str order: sort string
3617 | :param bool count: if True, only counts and returns the number of matching records (default: False)
3618 | :returns: at most ``limit`` records matching the search criteria
3619 |
3620 | :raise AccessError: * if user tries to bypass access rules for read on the requested object.
3621 |
3622 | search_count(self, *args, **kwargs)
3623 | search_count(args) -> int
3624 |
3625 | Returns the number of records in the current model matching :ref:`the
3626 | provided domain <reference/orm/domains>`.
3627 |
3628 | search_read(self, *args, **kwargs)
3629 | Performs a ``search()`` followed by a ``read()``.
3630 |
3631 | :param cr: database cursor
3632 | :param user: current user id
3633 | :param domain: Search domain, see ``args`` parameter in ``search()``. Defaults to an empty domain that will match all records.
3634 | :param fields: List of fields to read, see ``fields`` parameter in ``read()``. Defaults to all fields.
3635 | :param offset: Number of records to skip, see ``offset`` parameter in ``search()``. Defaults to 0.
3636 | :param limit: Maximum number of records to return, see ``limit`` parameter in ``search()``. Defaults to no limit.
3637 | :param order: Columns to sort result, see ``order`` parameter in ``search()``. Defaults to no sort.
3638 | :param context: context arguments.
3639 | :return: List of dictionaries containing the asked fields.
3640 | :rtype: List of dictionaries.
3641 |
3642 | signal_workflow(self, *args, **kwargs)
3643 | Send given workflow signal and return a dict mapping ids to workflow results
3644 |
3645 | sorted(self, key=None, reverse=False)
3646 | Return the recordset ``self`` ordered by ``key``.
3647 |
3648 | :param key: either a function of one argument that returns a
3649 | comparison key for each record, or ``None``, in which case
3650 | records are ordered according the default model's order
3651 |
3652 | :param reverse: if ``True``, return the result in reverse order
3653 |
3654 | step_workflow(self, *args, **kwargs)
3655 | Reevaluate the workflow instances of the given record IDs.
3656 |
3657 | sudo(self, user=1)
3658 | sudo([user=SUPERUSER])
3659 |
3660 | Returns a new version of this recordset attached to the provided
3661 | user.
3662 |
3663 | By default this returns a ``SUPERUSER`` recordset, where access
3664 | control and record rules are bypassed.
3665 |
3666 | .. note::
3667 |
3668 | Using ``sudo`` could cause data access to cross the
3669 | boundaries of record rules, possibly mixing records that
3670 | are meant to be isolated (e.g. records from different
3671 | companies in multi-company environments).
3672 |
3673 | It may lead to un-intuitive results in methods which select one
3674 | record among many - for example getting the default company, or
3675 | selecting a Bill of Materials.
3676 |
3677 | .. note::
3678 |
3679 | Because the record rules and access control will have to be
3680 | re-evaluated, the new recordset will not benefit from the current
3681 | environment's data cache, so later data access may incur extra
3682 | delays while re-fetching from the database.
3683 |
3684 | toggle_active(self, *args, **kwargs)
3685 | Inverse the value of the field ``active`` on the records in ``self``.
3686 |
3687 | update(self, values)
3688 | Update record `self[0]` with ``values``.
3689 |
3690 | user_has_groups(self, *args, **kwargs)
3691 | Return true if the user is at least member of one of the groups
3692 | in groups_str. Typically used to resolve ``groups`` attribute
3693 | in view and model definitions.
3694 |
3695 | :param str groups: comma-separated list of fully-qualified group
3696 | external IDs, e.g.: ``base.group_user,base.group_system``
3697 | :return: True if the current user is a member of one of the
3698 | given groups
3699 |
3700 | view_init(self, *args, **kwargs)
3701 | Override this method to do specific things when a view on the object is opened.
3702 |
3703 | with_context(self, *args, **kwargs)
3704 | with_context([context][, **overrides]) -> records
3705 |
3706 | Returns a new version of this recordset attached to an extended
3707 | context.
3708 |
3709 | The extended context is either the provided ``context`` in which
3710 | ``overrides`` are merged or the *current* context in which
3711 | ``overrides`` are merged e.g.::
3712 |
3713 | # current context is {'key1': True}
3714 | r2 = records.with_context({}, key2=True)
3715 | # -> r2._context is {'key2': True}
3716 | r2 = records.with_context(key2=True)
3717 | # -> r2._context is {'key1': True, 'key2': True}
3718 |
3719 | with_env(self, env)
3720 | Returns a new version of this recordset attached to the provided
3721 | environment
3722 |
3723 | .. warning::
3724 | The new environment will not benefit from the current
3725 | environment's data cache, so later data access may incur extra
3726 | delays while re-fetching from the database.
3727 |
3728 | :type env: :class:`~openerp.api.Environment`
3729 |
3730 | ----------------------------------------------------------------------
3731 | Class methods inherited from openerp.models.BaseModel:
3732 |
3733 | _browse(cls, env, ids) from openerp.models.MetaModel
3734 | Create an instance attached to ``env``; ``ids`` is a tuple of record
3735 | ids.
3736 |
3737 | _build_model(cls, pool, cr) from openerp.models.MetaModel
3738 | Instantiate a given model.
3739 |
3740 | This class method instantiates the class of some model (i.e. a class
3741 | deriving from osv or osv_memory). The class might be the class passed
3742 | in argument or, if it inherits from another class, a class constructed
3743 | by combining the two classes.
3744 |
3745 | _inherits_reload(cls) from openerp.models.MetaModel
3746 | Recompute the _inherit_fields mapping.
3747 |
3748 | _init_constraints_onchanges(cls) from openerp.models.MetaModel
3749 |
3750 | _init_function_fields(cls, pool, cr) from openerp.models.MetaModel
3751 |
3752 | _patch_method(cls, name, method) from openerp.models.MetaModel
3753 | Monkey-patch a method for all instances of this model. This replaces
3754 | the method called ``name`` by ``method`` in the given class.
3755 | The original method is then accessible via ``method.origin``, and it
3756 | can be restored with :meth:`~._revert_method`.
3757 |
3758 | Example::
3759 |
3760 | @api.multi
3761 | def do_write(self, values):
3762 | # do stuff, and call the original method
3763 | return do_write.origin(self, values)
3764 |
3765 | # patch method write of model
3766 | model._patch_method('write', do_write)
3767 |
3768 | # this will call do_write
3769 | records = model.search([...])
3770 | records.write(...)
3771 |
3772 | # restore the original method
3773 | model._revert_method('write')
3774 |
3775 | _revert_method(cls, name) from openerp.models.MetaModel
3776 | Revert the original method called ``name`` in the given class.
3777 | See :meth:`~._patch_method`.
3778 |
3779 | is_transient(cls) from openerp.models.MetaModel
3780 | Return whether the model is transient.
3781 |
3782 | See :class:`TransientModel`.
3783 |
3784 | ----------------------------------------------------------------------
3785 | Static methods inherited from openerp.models.BaseModel:
3786 |
3787 | __new__(cls)
3788 |
3789 | ----------------------------------------------------------------------
3790 | Data descriptors inherited from openerp.models.BaseModel:
3791 |
3792 | __dict__
3793 | dictionary for instance variables (if defined)
3794 |
3795 | __weakref__
3796 | list of weak references to the object (if defined)
3797 |
3798 | _all_columns
3799 | Returns a dict mapping all fields names (self fields and inherited
3800 | field via _inherits) to a ``column_info`` object giving detailed column
3801 | information. This property is deprecated, use ``_fields`` instead.
3802 |
3803 | _constraint_methods
3804 | Return a list of methods implementing Python constraints.
3805 |
3806 | _context
3807 |
3808 | _cr
3809 |
3810 | _onchange_methods
3811 | Return a dictionary mapping field names to onchange methods.
3812 |
3813 | _uid
3814 |
3815 | ids
3816 | List of actual record ids in this recordset (ignores placeholder
3817 | ids for records to create)
3818 |
3819 | ----------------------------------------------------------------------
3820 | Data and other attributes inherited from openerp.models.BaseModel:
3821 |
3822 | CONCURRENCY_CHECK_FIELD = '__last_update'
3823 |
3824 | __metaclass__ = <class 'openerp.models.MetaModel'>
3825 | Metaclass for the models.
3826 |
3827 | This class is used as the metaclass for the class :class:`BaseModel` to
3828 | discover the models defined in a module (without instantiating them).
3829 | If the automatic discovery is not needed, it is possible to set the model's
3830 | ``_register`` attribute to False.
3831 |
3832 | _custom = False
3833 |
3834 | _date_name = 'date'
3835 |
3836 | _group_by_full = {}
3837 |
3838 | _needaction = False
3839 |
3840 | _parent_name = 'parent_id'
3841 |
3842 | _parent_order = False
3843 |
3844 | _parent_store = False
3845 |
3846 | _translate = True
3847 |
3848 | ----------------------------------------------------------------------
3849 | Methods inherited from openerp.addons.base.res.res_partner.format_address:
3850 |
3851 | fields_view_get_address(self, *args, **kwargs)