because of a previous refactoring, the function send_notification stopped working
at all. It was not using the instance of the bus, but the module containing the
bus instance.
- Werkzeug's HTTPException are useful while dispatching HTTP requests,
in order to return a custom error page with an appropriate status
code. The http stack should let those exceptions bubble all the way up
and return the body of the exception as the HTTP response.
- openerp.http.AuthenticationError may be useful while dispatching JSON
requests, because the JSON error result will have error code 100
instead of the usual code 200, making it easy to distinguish
in simple JSON client code.
- Also slightly improved the fallback for unknown exceptions occurring
during "safe evaluation", to explicitly mention the original exception
type in the generic ValueError that gets raised.
When installing website or one of its dependencies directly, the website
attribute is not defined on request. If the installation triggers qweb
rendering [1], we need to correctly check the presence of the website
attribute, which this commit does.
[1]: This is the case in website_blog since
4a132e2afb
This reverts commit 44e8b92beb.
The condition is wrong as a view starting with DOCTYPE as top element will be
excluded, including its child (the whole page them).
Re-add the translatable title that was excluded by the condition.
Give the same as access rights to the employee as for the public user.
This patch is needed to allow a user to access the partner form.
Same for portal.
The list of grades in not a confidential information.
Fixes#7719
When the admin creates a SO, he has access to all taxes (since ir.rules
do not apply to him); therefore in some cases, the SO could be created
with SO lines that have taxes from other companies. This usually does
not make sense.
From this revision on, only taxes that are in the same company as the
SO are applied to the lines. If no company is set, then no filtering
is done.
This is a fix for f04f409943, which only
prevented the workers from being spawned in Prefork mode, while the
socket was still being bound to - this is a problem when starting a
worker-only server as it cannot coexist with the XMLRPC server on the
same machine.
Closes#1828
When merging leads with a company set different
than the current user company,
it failed because the notification email (the message
written in the thread summarizing the merge) couldn't
read the company name (the `name_get` call on the company)
because of the multi-company record rule.
`name_get` can be safely called as `sudo`, as it does
nothing else than returning the name of the record. This is
already done for the many2one links in the web client anyway
(You can see leads from a company different than yours,
you can see the company name to which the leads belongs to,
but you can't click on the company many2one link)
opw-677986
When sending a notification email to an event attendee
for an all day event, the timezone must be ignored
as the `start` and `stop` datetime are stored as
the day date + '00:00:00'. If the timezone is applied,
for users being in a negative timezone (such as an American
timezone), the day displayed would be the day just before.
opw-677019
c8732bea1e did not take into account that
we don't have specific callbacks for weight or price type
barcodes. Those where handled by the product callback.
opw-678556
Since revision 7eab8e26d3
the `_onchange_partner_id` of `account.invoice` failed
if the SUPERUSER created an invoice for another company
than his own, and if the partner had not a specific
receivable or payable account (meaning the default
accounts are used, the accounts coming from the properties
of this company without any partner specified)
because
```
prop.search([
('name', '=', 'property_account_receivable_id'),
('company_id', '=', company_id)
])`
```
can return multiple records, if several partners
have their own receivable accounts set, and,
since the above revision,
`get_by_record` specify `ensure_one`, meaning
you cannot pass multiple records to this method.
This domain was built a the time
(2009, rev. 80861660c6)
to handle the multi-company property,
which can now be handle with a simple `force_company`
passed in the context. It was not the case at the time.
This revision could be applied in former releases,
but this is not a necessity. This is a necessity
in saas-10, because of the above revision.
opw-678536
When computing the real price of a product, a currency of reference is
needed, first the currency of the product's company is privileged and
if no company is set on the product then the currency of the user's company
is taken.
opw:678159
A read more was added to every node having a mail-quote tag.
However all quotes and their child nodes are tagged, leading to numerous unnecessary read more / read less.
Now, all consecutive mail-quote are joined in one 'read more/read less'.
When a user has the access rights "Configuration" or "Access Rights"
regarding the "Administration" module category, the click on the
"Settings" menu leads to an access error.
This is because the dashboard fetches data about the number of installed
modules ("installed_apps"), which requires access to "ir.module.module".
Since it is not easily possible to hide a parts of the dashboard (the
static templates do not recognize the "groups" attribute), we simply
hide the dashboard for these users.
opw-678531
Quants are created, and stock moves are updated, with the purchase
value converted at current rates. However, the product average
was calculated before that value was retrieved. This ensures
the correct value is retrieved for the average cost calculation
and will match the actual quants.
Fixes#12163Closes#12164
opw-678511
It is not possible to edit the start_date, end_date, start_datetime,
end_datetime and duration for a recurrent event due to the raesons
explained in https://github.com/odoo/odoo/issues/10278 or see
opw:665700
opw:677139
The get_recursive_parent function seemingly depended on the ordering of
the rule_categories recordset which happens to work fine in most cases
because all data first defines the parent before defining the children
rule categories. But if you happen to do it the other way around it
won't work and it will infinitely call itself because:
if rule_categories[0].parent_id:
rule_categories = rule_categories[0].parent_id | rule_categories
won't change the value of rule_categories[0].
opw-673222 (loosely related)
When going over the colorpicker when no bg-* class was selected yet,
the bg-undefined class was added on the snippet.
Also, when clicking on the reset button, the bg-* class was removed
but the selected button in the colorpicker was not unselected.