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