1/ When the new database is created without demo data, the admin has a
'silhouette' as a default picture. When a new user is created without
picture given by the current user, the new user will have a 'silhouette'
as a default profile picture.
2/ web: image for fa-user-slash. This image will be used when a record is
unassigned.
3/ web, *: Change placeholder by default when record is unassigned.
We want to have a fa-user-slash icon when a record is unassigned instead
of 'placeholder.png'. A method is created in the BaseModel to have a
generic method to change easily the placeholder for other models.
4/ Adapt kanban test to keep the same behaviour. Attention the behaviour is
a bit different. Because, now the default image is given by the server to
change easily the default image when a record doesn't have an image.
Thus, we don't say if it's the default placeholder, but we can say it's
not the same image of the record (in this test, the record, it's the
partner).
5/ misc: display 'Unassigned' in the hover on kanban cards if record is unassigned
closesodoo/odoo#41356
Taskid: 2060206
Related: odoo/enterprise#7758
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: jdoutreloux <jud@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
Fields (and selection values) were re-labeled in multiple models but
the corresponding import templates were not updated to match, and are
now non-working (can't straight import the templates themselves which
is inconvenient).
Task 2059779
closesodoo/odoo#39834
X-original-commit: 185edc0165e834edd859b3413f03549f1dc71c69
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
In a settings form view, do some changes, then click on a button
or link in the form (e.g. 'Manage Users' in General Settings).
We now ask if the user wants to discard the changes before leaving
the page.
Task 1921574
closesodoo/odoo#34799
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
The purpose of this commit is to expose SEPA Direct Debit acquirer to
the Odoo community edition. The dedicated module, though, is restricted
to the enterprise edition.
Minor changes in following modules:
- base: added ir.module.module record
- payment:
- added data to expose the new payment acquirer.
- added 'to_buy' field to track whether the payment acquirer is
restricted to enterprise users.
- allow multi word payment acquirer name. It was breaking on the first
underscore.
task-1870363
closesodoo/odoo#26427
When user will modify something in settings, there will be a message
shown that will tell the user that he/she has unsaved changes.
task-1917637
closesodoo/odoo#31900
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Before this rev., we searched for 'label' tagname into the DOM, but
the fields labels are not always inside <label> (sometimes <span>).
However, they always have className 'o_form_label', so we use this
instead.
task 1961427
closesodoo/odoo#33487
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is a few small improvement/fixes to the web framework:
- allow placeholder attribute on input tags in form view
- only bind click event handler to buttons managed by the framework, not
custom ones
- _onExecuteAction method in action manager properly fails if event
cannot be properly handled
closesodoo/odoo#32458
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Since the images are not guaranteed to be square anymore, the kanban image had
to be adapted to better handle the different image ratios.
Also the placeholder has been moved into the actual image div instead of
being a separate div that acted differently.
The avatar placeholder was white... displayed on top of white. Now it's grey
so we can actually see it.
task-1958000
PR: #31811
Why reverting ?
The fact that the control panel changes width on first edit is confusing to the
user. The whole form shifts down. We want to avoid having elements appearing
and disappearing. The issue that the user does not know if he has to save is
still up to date, and will be addressed in the next saas. We will most likely
use what has been done in this task to only display 'There are unsaved
changes'. Thank you all for your work here!
Original task and revert discussion can be found on task ID 1917637 .
This reverts commit 514d6fb90d.
closesodoo/odoo#31622
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
State from the template was 'CA' for California - not recognized on import
Changed it to 'California' to match with the db data
opw 1943904
closesodoo/odoo#31556
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
In small devices, onboarding bars are displayed vertial, which
takes too much screen space, and user has to scroll down
a lot to view actual content.
This commit improves the behavior by showing onboarding bars
horizontally (with scrolling) in small devices also, and thus
occupying minimal screen space.
task: 1929048
closesodoo/odoo#30823
Improved partner form consistency and clarity via following changes:
- Renamed string and tooltip from Shipping address to Delivery address
- Changed description of the customer address
- Re-organised contact partner form and added image of partner
- Changed default avatar to a simpler one that is not Stephane Bern
- Test case improvement
Task ID: 192044
closesodoo/odoo#29917
Purpose
=======
It only makes sense to display 'Save' and 'Discard' if the user actually
changed something in the settings.
So after this commit, the 'Save' and 'Discard' buttons of statusbar in
general settings will only appear when you make any changes.
Also when there are changes, there will be a message shown that will tell
the user that he/she has unsaved changes.
The commit is related to Task ID: 1917637
Co-authored-by: Mohammed Shekha <msh@openerp.com>
closesodoo/odoo#29726
This reverts commit 01173f3745.
This commit added improvements in search and ordering of settings. However
due to DOM manipulation some events are not bound correctly. Notably saving
settings could be broken if several different tabs are modified before
saving.
After checking more in-depth settings code it appears it will be difficult
to ensure a proper re-rendering and re-ordering of settings without having
to modify deeply the code. This is therefore more a task for JS framework
team.
closesodoo/odoo#29285
Allows users to not only search on settings name but on their description too.
Improves search results relevance :
Instead of the actual fixed order, top results should be about the module
selected in the left panel
Task : #1893252
closes : #28094
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.
All the helpers are exposed though testUtils.js.
There are 2 kinds of helpers:
1. Assertions
-------------
* assert.containsNone, containsN, containsOnce check that the DOM
(or a specific part of the DOM) contains a `selector`. It
generates a correct error message automatically.
ex: assert.strictEqual(form.$('.o_form_editable'), 1, "msg");
-> assert.containsOnce(form, '.o_form_editable');
* assert.isVisible, isNotVisible check that the DOM has an element
visible or not. They also check that the element is actually in
the DOM (before most tests didn't verify this).
* assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
properties of a DOM element, and also validate that it is
applied on a single existing DOM element (before most tests
didn't verify this).
ex: assert.notOk(form.$('button').hasClass('btn-primary'));
-> assert.doesNotHaveClass(form.$('button'), 'btn-primary');
2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.
Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
ex: form.$('button').click();
-> testUtils.dom.click(form.$('button'));
New Form utilities: (testUtils.form.*)
clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
the control panel buttons of the form.
`reload` reloads the form data.
New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).
New fields utils: (testUtils.fields.*)
* editInput, editSelect: allow to change the value of a field,
using a selector to identify it. They validate that the input
exists and trigger the change event automatically.
* editAndTrigger: allow to modify a field and trigger specific
events after the value change
* many2one (testUtils.fields.many2one.*)
clickOpenDropdown, clickHighlightedItem, clickItem,
searchAndClickItem: use a field name instead of a selector and
do all the complex mechanism to open, filter and highlight
many2one fields.
Joint work with aab, dam, ged, mge, svs and vsc.
Before this commit, when the user is in a form view (edit mode) and
click on a stat button, a new action is added to the action stack. When
the user then comes back to the form view by clicking on the breadcrumb,
it is supposed to be in readonly mode. Before this commit, this was not
the case.
This bug comes from the action manager refactoring, which removed the
view manager. With this commit, we add a new action lifecycle method
which is called when the action is restored.
Note that this commit implicitely changes the semantic of actions with
'target=inline'. As far as I can tell, this only applies to the settings
form view, which can easily be fixed by overriding the restore hook.
closesodoo/odoo#28663
If no value is specified on the datefield, do not set a warnfuture message
Remove code comment that was referring the condition present at b51b0d66c2
but no longer present.
Add tests
Fixes#27551closesodoo/odoo#27593
If a deferred field, for example with auth_user_policy installed:
<field name="f" password="True" widget="password_meter"/>
is inside the res_config_settings view, the rendering will be deferred
which is not taken into account when initializing the content
(_initModules) or attaching to DOM (after start).
Thus we would would get an error and have no access to settings.
The issue that happened in 12.0 was solved with 23bec7fb7 and refactored
in between in 5bbbd25ed, but the heart of the issue was not solved in
the case of a customization.
With this commit, we do not lose the deferred when it is necessary to
keep them in the case of deferred while rendering.
Without fix, the added test fails with a traceback and message:
TypeError: Cannot read property 'settingView' of undefined
opw-1890343
closes#27589
Before this commit, the search input was focused everytime the settings
view was rendered after a timeout of 0. This is not considered as correct.
It is fragile as asynchronous code could break in many situations.
This commit fixes that behavior by using a hook 'on_attach_callback' which
is called when the widget is put in the DOM.
This commit is linked to task ID 47221 and PR #26483.
Purpose
=======
Clean some stuff on the onboarding bars:
- Payment setting should be activated in sales settings if a payment acquirer is
activated from the sales bar, otherwise the customer can't pay with the acquirer
- No email is sent with sample documents -> sending to yourself using the chatter doesn't work...
- Select "sign online" by default
- Improve payment instructions
- Improve the default thank you message on payment acquirer accordingly (when no bank defined)
- Choose a custom payment method -> mark the step as done
- Improve buttons wording:
- Put a pointer cursor when hovering on done steps
- Fix typo : instructions -> Instructions
- Fix layout issue on tax screen
Before this rev. one could set the report layout on the company using a
hardcoded list (background, clean, standard, etc.). Other modules (typically
accounting modules) could add options in this list. The used template was built
on the layout key.
Now, the layout is a many2one field to a newly created model `report.layout`,
which is linked to a view with the layout architecture.
This gives more control to customize reports and create a new layout (without
creating a python module that extend the layout selection).
[NEW] base: show enterprise module, with an 'upgrade' button
[IMP] *: some modules renaming, and improved copywriting of manifest
[IMP] *: utm on links to odoo.com
Odoo used to declare two main colors: primary and optional (which are
purple and turquoise in enterprise). Those were respectively assigned
to the 'primary' bootstrap variable and the 'btn-primary' bootstrap
variable.
BS4, however, does not allow to have a different primary color for
buttons. Instead, the 'primary' color is used for all 'primary' related
components and utility classes, same as for all other colors. So, if we
want to keep our enterprise buttons green, our 'optional' colors had to
become our 'primary' color. The old odoo primary is then renamed to the
'odoo' color.
The palette of grays is now larger by default and is numbered from 100 to
900 alongside the $black and $white variables. The equivalence for older
variables and the way we used them is:
$gray-darker -> gray 900 (unused before)
$gray-dark -> gray 900
$gray -> gray 700
$gray-light -> gray 600
$gray-lighter-darker -> gray 400 (the old variable was created by us)
$gray-lighter-dark -> gray 300 (the old variable was created by us)
$gray-lighter -> gray 200
Fortunately, the 'lighter' variations we created fit well in the default
BS4 system ! Unfortunately, our $gray-lighter which carried the same
function as $gray-200 (see above) is very close to the new default
$gray-100 and quite distant from the new $gray-200. This will be handled
in the next commit.