Catch only the error related to the access of the linked record.
Previous was hidding error to access the ir.config_parameter and eventual other
errors from the orm.
Uses SUPERUSER_ID to access instance URL (e.g. portal has no access to it).
Fixes#4234#4234
This revert partially the rev. f2e4a10e1a
File "/home/odoo/src/odoo/8.0/addons/mail/mail_mail.py", line 76, in default_get
if context and context.get('default_type') and context.get('default_type') not in self._fields['type'].selection:
TypeError: argument of type 'function' is not iterable
The old-api model._all_columns contains information about model._columns and
inherited columns. This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...
This commit contains the following changes:
- adapt several methods of BaseModel to use fields instead of columns and
_all_columns
- copy all semantic-free attributes of related fields from their source
- add attribute 'group_operator' on integer and float fields
- base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
payment_acquirer, share, website, website_crm, website_mail: simply use
_fields instead of _all_columns
- base, decimal_precision, website: adapt qweb rendering methods to use fields
instead of columns
In some specific conditions (e.g. admin logging during cron run, concurrent update), writing on the mail object may fail, triggering a rollback of the transaction.
As the write was done after the SMTP sendmail action, an email could be sent twice (state not correctly put, would be retried at next process of the email queue).
This patch provoke the error before the sendmail action and thus avoids sending the email.
Fixes#552
when the email is not a notification, or not an email usign the automatic
threading. This means that when doing mass mailing with a fixed reply_to
there won't be any link to access the original document, which is what
we want. Otherwise when mailing partners, they have a link to access
their own partner profile, which does not make sense.
The forward port of the fix 3609ba10f2 will be done separately, as the mrp scheduler has been completely refactored from saas-5.
Conflicts:
addons/l10n_be_coda/wizard/account_coda_import.py
addons/point_of_sale/static/src/xml/pos.xml
addons/procurement/schedulers.py
This avoids storing useless "{}" values
in the database when there are no headers,
and avoids having to update all existing
entries when this column is added.
Just requires simple tests before evaluating
the headers contents.
This can give a performance boost on large databases
and should not be a concern in terms of access control
as the inheritance already grants access to the parent
records.
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
- added possibility in mail to have a model adding custom headers in emails sent for notifications for new messages
- mail.group now add list-id and precedence: list in the headers to inform mailing systems that those mails are to be considered as mailing lists
- website_mail_group adds some further data in the headers (subscribe, unsubscribe, archives)
- groups page now display the number of message in the last month
- notification emails are now queued after 50 recipients
Specifically when there are many emails in the queue, prefetching
all their attachments at once when processing the first one
could fail, so not even one mail would be sent.
Added explicit logging when an email triggers a MemoryError,
as well as logging when each email is successfully sent.
bzr revid: odo@openerp.com-20140502144431-r3brgagl4gel4wmt
This would permanently mark the mail as failed while
there is a good chance it will be sent properly next
time it is retried (provided the memory situation
improves or the server/worker has restarted).
bzr revid: odo@openerp.com-20140430102552-qkwv20b20nve64th
- mail: now trigger postprocess_sent_message in every case, being sent or not, as the state
is propagated in the method; udpated all addons accordingly;
- email_template: fixed URL to edit it in website + form view;
- mass_mailing: barchart now send jsonified value;
- mass_mailing: tweaking the form view with all options
bzr revid: tde@openerp.com-20140408124053-o9tb14k6v47s5mjd
- now workign on various models, taking the correct recipient (email, partner_id for partner or lead)
- improved test send: use email_to, now a many2many on contact model to ease the use of templates
- added action to create a mailing list from leads
- moved a res.partner dedicated action to its own file
- added an actoin to create a mailing list from contacts
- fixed mail_mail post_process: use mail_sent variable as mail.state is not available
bzr revid: tde@openerp.com-20140318164117-f2aou25u633j8m57