In this commit, we do two small changes to make it easier to encode
timesheets. The main issue is that we want to solve the following
situation: a user clicks on a cell in a timesheet grid view to open a
list view, then clicks on 'Create' to create a new timesheet. This will
open a form view, but some fields which could be prefilled are not
filled.
- do not reset task_id in some cases. This is important for the onchange
call which comes after a default_get, when there is a default project
value set.
- do not set employee_id if there is default_employee_id in context
This is useful when we open timesheets from the 'All Timesheets'
menu item, then add a new line, select a different employee, and open it
in the grid view (by clicking on the + icon from a cell). This opens a
list view, which is editable, but when we create a new entry, it ignores
the employee value.
Note: a commit in enterprise adds support for properly passing contexts
in grid view, see
https://github.com/odoo/enterprise/commit/f23003917f18b52bb69483cdaac3cb2164230aa6
Task: #35414
In mobile devices, the pad widget did not behave in a satisfactory
manner. Also, once it was in fullscreen mode, it was not possible to
come back to normal mode.
Task: #31545
PR: #15817
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.
Users can now click this field, instead of having Odoo open the Form View to click it.
Benefits:
1. Saves the user from clicking TWICE (they only have to click ONCE with this PR)
2. Keeps the list view of all spreadsheets open (user has to GO BACK to see the list without this PR)
The commit fix an issue causing the portal navbar to overlap/inherit wrong style in customised websites.
The previous layout used to add the entire portal navbar inside an <h3>, causing inner elements to inherit the titles style.
According to WC3 standards, titles can have phrasing content only.
Titles reference > https://w3c.github.io/html-reference/h3.html
Phrasing content reference > https://w3c.github.io/html-reference/common-models.html#common.elem.phrasing
By chance this issue was not visible on runbot, but was severely affecting our website and probably clients ones too.
This commit wrap the portal navbar in a standard bootstrap navbar structure, fixing the title issue and provinding some imp. too:
- Search is now available for mobile
- Modules can inject a custom/botstrap class (eg. navbar-default) ot customize design if needed
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
This commit:
1. removed the possibility to create page from the menu manager.
The usability of this feature wasn't great since create menu as a new page
would redirect to that newly created page without saving the menu manager
state.
Plus, there is already the 'NEW' button on the navbar to create a new page,
the menu manager should, as its name hint, only manage menus.
2. Handle a new case (officially at least) of menu: menu container.
Those menu are simply menus with '#' as URL. It will be usefull to create a
menu as a dropdown list container.
Note: We should take care of a menu's URL being updated to '#' to avoid the
menu's page URL to be also edited to '#'.
opw-1825883 & opw-1824263
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
This way, XMLRPC calls can get request details form the standard
`odoo.http.request` system.
Move jsonrpc to the same controller while at it, for coherence.
Fix#24183
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
When duplicating project, its analytic account
is copied. This came from the ancient inheritS
between the 2 models.
This commit prevent copying the AA. However,
if 'allow_timesheet' is checked, a new analytic
account will be created when duplicating the project.
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
... in session_storage.
The current action is stored in the session_storage (stringified),
so that it can always be restored on F5 (useful for dynamic
actions). Before this rev., it was stored with it's 'raw' context,
i.e. before its evaluation. However, when this context is an
instance of a CompoundContext, it is meaningless once restored.
So this rev. ensures that the action is stored with its evaluated
context.
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