- When merging partners with fields restricted to certain groups which the user doesn't belong, an access error is raised.
To avoid this, we only merge fields that are accessible by the user. We do so by using the method fields_get() that only returns the fields accessible by the current user.
If the user configures a default `template_id` for
the `mail.compose.message`,
this template was used by the mass mailing to render the email,
and, among others,
it therefore used the `email_to` of this email template,
to render the recipients,
and it was configured empty or something else than `object.id`,
it did not used the `active_ids` passed in the context to the
`mail.compose.message` `create` call to compute the correct
recipients
To reproduce:
- In developer mode (?debug)
- Open the full mail compose message
e.g. in app sales, open a so, hit new message,
and hit the button to open the full message composer
- Set the template to the quotation template is not there already
- In the debug menu of the dialog, View > Set defaults,
- Click the radio button to all users, and the default to Use template = ...
- Then, try to send a mass mailing. It will fail because it cannot
compute the `email_to` values correctly because the `email_to`
of the quotation template is empty.
opw-1840287
When creating a product "down payment" in multi company in function "create_invoices"
of the model "sale.advance.payment.inv", a default company was set on this product
and it could lead to access rights error when trying to invoice a SO from an other
company.
NB: The down payment product must be shared with all the companies, as this is
the only one that you can set in the ir.config_parameter.
opw:1841468
- Create u1 as a portal user
- Connect as u1, add products to the cart
- Duplicate u1 (e.g. u2)
- Connect as u2
u2 retrieves the cart of u1.
opw-1847328
When changing the customer to a customer with a different pricelist
than the pos default, the customer pricelist was not automatically selected.
This is because of an oversight in the below revision:
f76cc095b8
opw-1843709
fixes#24611
When a string value is assigned to a selection field expecting integers, the
value simply rejected. In such a case, convert the value to an integer before
validating it.
Some versions of the datutil library crash when a 'Z' (specifying 'Zulu' time)
is appended at the end of an rrule.
This is because they decided to be stricter when comparing timezone aware/naive
datetimes with rrules.
This bug appears when trying to create a recurring event on the calendar,
defined with an "until" (a certain date) rule.
We explicitly add the timezone information if the 'Z' is in the rrule.
We also remove the rrule ffield from the view, since it is not used and could
only interfere with the logic of the rrule creation.
related to commit 35a4263f0a
opw 1841761
- Set a specific expense account on an expense product
- Send an email to the expense alias
The specific expense account is not used; a default account is used
instead.
opw-1838174
In firefox, if we have a range on eg.:
`<input type="file">`
and we tabulate to get to it, we have the range over:
`<button type="button" tabindex="0">Browse…</button>`
which seems to be a "virtual" element inside the `<input/>` but this
magic element is "Restricted" and causes error such as:
`Permission denied to access property "nodeName"`
So this fix ignore errors when getting a range from current selection on
keyup.
opw-1819279
closes#24524
Open a pos session with a user A
Change cashier to user B
Make an order with invoice
Before this commit, the salesman of the order was user B
but the salesman on the invoice was A
After this commit, both invoice and order have user B as salesman
OPW 1844175
closes#24642
It seems that in v8 the internal reference (the code) of the product
was displayed in the sales details report of the pos
This commit put that field back on the report
OPW 1844776
closes#24641
When returning from the Adyen payment website, SHA signature check fails
because of an inconsistent bytes vs string comparison. This is due to
`base64.b64encode` returning bytes in P3.
opw-1841103
The residual amount of a customer invoice or a credit note is displayed
in the same way in the portal view. This can be confusing for the end
user since there is no way to distinguish both.
We display the residual amount as negative in case of a credit note.
opw-1841432
The comment "Note that once a Quotation becomes a Sales Order, it will be moved from
the Quotations list to the Sales Order list" isoutdated since 10.0 - sales
orders are also visible in the quotation list.
When parsing an email with some eml or dmg attachment, the parsing would
generate an attachment with empty content.
Since this content is later encoded in base64, it would crash trying to encode
None.
We simply do not process attachments without content.
We add a test to check that parsing mail with some empty attachment doesn't
crash, since the crash implies that the mail gets stuck on server
and is never fully processed by Odoo.
opw 1814014
Steps to reproduce the bug:
- Enable multi companies and multi-currencies
- Multi company: Your Company and Test
- Users: Admin and Demo
- Login as admin user with the current company: Your Company
- Allowed companies: Your Company, Test
- Login as Demo user with the current company: Test
- Allowed companies: Test
- From the admin user with the current company: Test, do the following configuration in the product,
- product: iPad mini, select vendor: Delta PC with price $100 with company: test, currency: USD
- Change the admin's company from Test to Your Company, do the following configuration in the vendor,
- vendor: Delta PC, set supplier currency: EUR and payment terms: 30 Daya Net Payment
- Log in with the demo user
- Create SO for that product by selecting routes: Make to order and Confirm it.
- Open the PO which is generated from this SO
Bug:
The Currency and payment terms were set with the data set for Your Company
Excpected behavior:
Nothing is set for supplier currency and Payment terms as nothing is set for the company: Test
Closes#24564
opw:1841379
Some IPs (like google-proxy ones) are not bound to a specific country.
Legacy Database used to set country_code to 'EU' for these one. geoip2,
on contrary, does not set the country. Read information from `continent`
attribute in this case.
opw-1844888
- Create 2 companies A & B
- Create a sequence for PO in each company
- Set User A in Company A and Admin in Company B
- Create a MTO product with a 'Buy' route
- Create a SO with User A using the product, validate
The PO created uses the sequence for Company B instead of Company A.
The creation is done as `sudo`, and ultimately `next_by_code` will use
the company of the Admin.
opw-1839656
Before this commit:
1. If a menu was used as a container (dropdown) and had an unpublished page_id
(website.page), we would never show that menu (and so its submenus) even if
it has visible submenu.
Some users are stuck with this since they:
a) create a new page 'A' (unpublished by default) included in menu.
b) create a new page 'B' (unpublished by default) included in menu.
c) set 'B' as a submenu of 'A' in the menu manager
d) decide to publish the website.page linked to menu 'B'
Then, since menu 'A' is linked to an unpublished page, the menu 'A' and 'B'
are never visible.
2. If a menu is being created with an URL that match a website.page URL, the
m2o relation will automatically be set (website.menu.page_id).
Still, if the user type the URL without the leading slash, the m2o won't be
set.
This could be misleading since on the page property in the page manager the
URL is being shown without the leading slash even if it is stored in DB.
Now:
1. We always show menu container if they contains visible submenu, even if the
container menu is linked to an unpublished page
2. The page URL search is more clever and will match URL even if the only
difference is the leading slash.
This closes#24635
When ir.values was removed and the "action" ir.values were merged
directly into the actions themselves, "client_action_relate" was
discarded as unused (and possibly too similar to
client_action_multi?). *However*:
* it was actually used implicitly as "relate" was the default key2 of
the <act_window> XML tag
* and it had a crucial difference from client_action_multi:
client_action_multi is shown on both form and list views by default
and only on list if multi=True, whereas relate is shown on *either*
the form or list view (tree if multi else form)
This means without relate the actions which should be only visible on
the form view are now on both list and tree, which leads to
overpopulated `Action` menus and odd behaviours (e.g. actions relying
active_id on lists, which id do they get and why?)
=> reintroduce relate as "action_form_only" for the specific case of
multi=False and either no key2 or a key2 of client_action_relate. If
multi=True then binding_type=action.
Fixes#20124
Followup: Task 1843603 to remove #multi and redundancy
Swedish Postal Codes are 5-digit codes with the following format: XXX XX
Before the fix:
With VAT=SE556242088401
For [zip_code] [city] = [171 42] [SOLNA]
we got [zip_code] [city] = [171] [42 SOLNA] because 'zip_code' didn't allow whitespaces
opw:1841010
The transcoding of a mail (transforming CSS into inline styles on the
element nodes of the mail) used the form:
property:value;
So when a mail is saved, it would be eg. with `style="property:value;"`
and when it is being edited "property:value" is removed if available via
CSS stylesheet given the structure.
But the sanitize_style (introduced in bfe7aafa7) adds an espace before
the value (which is more pretty but was probably not choosen in
transcoding to decrease size of mail):
property: value;
so the inline style would not be removed when editing possibly causing
conflict with the editor.
With this commit, the sanitize_style doesn't add a space. It could have
been changed in transcoding but the code is already rather slow and we
don't want to use a regex replace or two string replace instead of the
current one string replace.
opw-1841107
The browser may throw an error when a big mail such as one with
hundreds thousands of tags is being transformed to have a style
more compatible with mail clients.
The error would be:
"Uncaught RangeError: Maximum call stack size exceeded"
This happens in jquery because we hare too many nodes (there is an
ongoing issue at https://github.com./jquery/sizzle/issues/403) so this
commit replace that part by a DFS traversal over DOM nodes.
There was also an issue that not having the option "style-inline" would
still cause some style code to be ran albeit it was intended not to be
solved in 55c7d2d5b0.
opw-1841107
closes#24550
It was containing a bad translation "Inicaitiva / Oportunbidad" while the
correct one "Iniciativa / Oportunidad" was already done in Spanish.
Remove files to avoid getting the wrong translations.
Regional translations can be used for different terms, avoid to use the same
to make it easier to maintain.
Fixes#24613
Currently, if user does not have enough karma to perform specific action on
forum, alert-box with appropriate message is displayed to the user.
There are several issues with these alert-boxes, like :
- Click on same CTA multiple times, creates multiple alerts
- Click on another CTAs keeps previous alerts on the screen, and adds
further alerts, which sometimes overlaps adjacent CTA and looks ugly.
After this commit :
- Alerts are displayed below their related CTAs
- Only one alert appears at a time on the screen
Fixes : #23071
PR : #23800
Task# : 1829835
This commit closes#23071
This commit closes#23800
When creating a subtask (or a task), parent_id is passed in the create values.
Howver, when the task is not a subtask, we might want to set the SO line directly
and not erasing it with the one from the inexisting parent. So the values of
parent_id is required to force the so line value when creating a task.
Closes#24592Closes#22707
When manipulating domain, this is always better to
normalize them, otherwise we can have strange behavior
when handleing them with `expression.OR` and
`expression.AND`.
For instance:
domain = [('so_line', 'in', [91]), ('amount', '<=', 0.0)]
timesheet_domain = ['&', ('so_line', 'in', []), ('project_id', '!=', False)]
`expresion.OR(domain, timesheet_domain)` will give
['|', ('so_line', 'in', [91]), ('amount', '<=', 0.0), '&', ('so_line', 'in', []),
('project_id', '!=', False)]
And this is not what we attempt.
Closes#24038