This is a standard BS4 bug: radio buttons's dot is not properly centered
as soon as the html font-size is not a multiple of 4 (and our backend
uses 13px). As a quick fix, I change that to 12px and use a font-size base
of 13/12rem so that the body font-size does not change. Bootstrap will
probably fix this in a future update.
Let's consider the partner P1 with the address A1 and its invoice partner P2
with the address A2.
When creating a transaction in the shop for P1 with billing address = A1:
- if option Payment Flow = Redirection to the acquirer website
=> the billing address of the transaction is A1
- if if option Payment Flow = Payment from Odoo
=> the billing address of the transaction was A2
Now with this patch, the billing address is A1 in each case.
opw:1867188
Purpose
=======
Improve some common usability issues coming from the invoicing followup.
Specification
=============
1. Sale: Rename 'Check/Set Price' buttons for more clarify
relabel "Check price" -> "Get rate"
relabel "Set Price" -> "Add to order"
2. Sale: Change the default invoicing method if there are downpayments
Purpose
-------
Currently the default invoicing method is not very clear.
Specification
-------------
Currently the result is not really correct. We can propose to deduct
the down payment even if there are no down payments on the sales order.
Now the option to deduct down payments will be selected if there
is a downpayment line on the sales order and if there exists at
least one invoice linked to the sales order that is not cancelled.
3. Delivery: Improve the SO invoice status
Purpose
-------
If a SO is only containing lines for which the product is invoiced on
the delivered quantity, the sales order is marked as 'Nothing to Invoice'.
If I add a delivery line, the SO becomes 'To Invoice'. There is not really
a use case in the real life where you will invoice the delivery fees before
invoicing what has been really delivered.
Specification
-------------
If an order:
- contains delivery lines or downpayment lines
- If the product on the other lines are invoiced on the delivered quantity
- Nothing has been delivery or can be invoiced for theses lines
Set the invoice status of the sales order to 'Nothing to invoice' instead
of 'To Invoice'
4. Sale: Unlink the down payment on a SO if the invoice is unlinked
Purpose
-------
When we create a downpayment line of SO and when we delete Invoice of downpayment then so line for downpayment is not deleted.
Specification
-------------
Remove the downpayment line in the SO if the related invoice is deleted
Task ID :33126
Purpose
=======
When we create a downpayment line of SO and when we delete Invoice of downpayment then so line for downpayment is not deleted.
Specification
=============
Remove the downpayment line in the SO if the related invoice is deleted
Task ID :33126
Purpose
=======
If a SO is only containing lines for which the product is invoiced on
the delivered quantity, the sales order is marked as 'Nothing to Invoice'.
If I add a delivery line, the SO becomes 'To Invoice'. There is not really
a use case in the real life where you will invoice the delivery fees before
invoicing what has been really delivered.
Specification
=============
If an order:
- contains delivery lines or downpayment lines
- If the product on the other lines are invoiced on the delivered quantity
- Nothing has been delivery or can be invoiced for theses lines
Set the invoice status of the sales order to 'Nothing to invoice' instead
of 'To Invoice'
Task ID : 33126
Purpose
=======
Currently the default invoicing method is not very clear.
Specification
=============
Currently the result is not really correct. We can propose to deduct
the down payment even if there are no down payments on the sales order.
Now the option to deduct down payments will be selected if there
is a downpayment line on the sales order and if there exists at
least one invoice linked to the sales order that is not cancelled.
Task ID : 33126
Modal footers now use flex to vertically center buttons. So our
left-align style overridde had to be adapted. Also, we sometimes
use footer buttons as non-direct children of the modal-footer, which
is not a supported BS4 case, so we had to adapt that too.
Revision on https://github.com/odoo/odoo/commit/4b3588feb2b7e260bf237b0f3944c90cdc47c3b5
In order to not replace characters with '*' in edit mode (because of `input`
with type 'password'), the above commit did not format the value at all.
The formatter of a char with the option 'isPassword' turns all of its
characters into '*'. That is not intended for password inputs, because the
content is hidden by the browser with the 'password' type.
The issue with not using the formatter is that an empty field has the value
`false`, so an empty password field produces an non-empty password input with
its value to 'false'.
This commit fixes the issue by forcing empty string for empty password values.
Note: if you use an integer field with password, falsy values (e.g. `0`) become
empty strings in the input value.
Purpose of this merge is to ease the use and discovery of activities by
notifying people assigned on an activity. This is limited to activities
assigned to another user than the creator to avoid being notified of
activities you just created for yourself.
This merge is related to task ID 1854820. Closes PR #25265.
When someone assigns an activity to another user it is a good idea to
notify this user a new activity has been assigned to him. This is done
using the message_notify method that sends a notification either in the
Inbox either by email depending on the user preferences.
This commits is linked to task ID 1854820. Closes PR #25265.
Before this commit, when someone was editing a password, the stored
password may not be the expected one by the user.
Steps to reproduce:
1. Open "Outgoing Mail Servers" form.
2. Set a password (e.g. "yop").
3. Save, then edit.
4. Add "y" at the end of the password field.
> Expected value: "yopy"
> Actual value: "***y"
This is due to the use of the char field formatter, which displays passwords
by replacing the characters with '*'. It is not necessary to do this in edit
mode, because it uses an input field of type 'password'. The browser
automatically hides the value of such inputs.
Any changes on a input field in edit mode uses the value of the input, so the
value of an password input should contain the password, without '*'.
This commit fixes the issue by using the formatter in edit mode for the input
of type 'password'.
Task-ID 1869565
The test which checks if the table column widths do not change when
switching to edit mode and back to readonly mode was not properly
written, which made its debugging difficult.
One small village of indomitable Gauls still holds out against the
invaders. With previous commit, some BS4 tests were solved by patching
our assets bundling system. This commit handles the only remaining test
that fails... by disabling it. Again, only PhantomJS fails to execute
that test, so this test should simply be reenabled by reverting this
commit as soon as we implement a better test system than PhantomJS.
BS4 do not provide vendor prefixes scss mixins anymore as it is meant
to be used with the 'autoprefixer' library. As we only support the last
version of every major browsers in Odoo, we took the decision to not
use the library as it was also complex to integrate in Odoo. We decided
to do the library's work by hand if it ever become necessary.
This commit was made because we found a case where it is necessary: flex
display and flex property are not understood by PhantomJS, so lots of
our JS tests failed because some elements were considered (in)visible
while they are in fact not (in an updated browser). This commit should
be reverted once we implement a better alternative to PhantomJS.
* website_sale_comparison, website_sale_wishlist
<a/> elements without any href are now styled differently with BS4...
but we should never use one of those. Replaced those by <button/>
elements.
The big plan is to remove our current editor and its customization and
replace it with an updated summernote. Meanwhile, we have to patch our
current lib directly so that it works with BS4.
* portal, web_tour, website, base
Before this commit, there were 3 different implementations for the same
feature: the "more" button in the community navbar, the "+" button for
the website menu and the "+" button in the enterprise navbar. As those
implementation were now broken with BS4, it was a good time to share the
code of those 3 features.
* survey, website_slides
Before this commit, the web_editor app created bg and text classes its
own way for theming (alpha, beta, grays, ...). Now the system is far
more automatic by extending BS4 color maps.
* payment, portal, website, website_sale, website_sale_delivery
The way we used BS3 was not always perfect/conventional and was thus
not BS4 compatible at all.
Also improve the general look of some screens.
Only two classes remain to declare a media structure:
'media' and 'media-body'. 'media-left/right' are guessed by their
position using the flex layout.
Also, the 'media-list' class has been dropped but <ul/> element
should use the 'list-unstyled' class instead.
Like all other components, spacing between medias are now to be
handled explicitely thanks the spacing utility classes.
In a previous commit, we removed the use of the 'btn-sm' classes as we
used it everywhere for default-size buttons instead of customizing the
size of those default-size buttons directly.
This commit proves it was even more necessary as the 'btn-xs' class does
not exist anymore in BS4 and we so can use the 'btn-sm' class instead.
The '.badge' elements must now also use the 'badge-pill' class to get
the same style as before as '.badge' elements without it are meant to
replace the old 'label' component.
Before this commit, Odoo used checkboxes in three different ways:
- A simple <input type="checkbox"/>, mainly in the frontend. The style
is browser dependant.
- Same as above but with the BS3, checkbox structure. The style is still
the same, but the alignement is supposed to be better (which is not
always the case).
- The Odoo official structure:
```
<div class="o_checkbox">
<input type="checkbox"/>
<span/>
</div>
```
which allows to have a cross-browser checkbox style and correct
alignements.
The goal after this commit is to only use the BS4 *custom* checkbox
structure to achieve the same goal as our official structure (and
remove that one):
```
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck1">
<label class="custom-control-label" for="customCheck1">...</label>
</div>
```
/!\ Labels are now required (use a zero-width space if necessary)
The 'form-horizontal' class have been removed; the '.form-group'
elements must now use the 'row' class for an horizontal layout.
The 'control-label' class was renamed to 'col-form-label'.
The 'help-block' class was renamed to 'form-text'.
The 'has-error' and 'has-success' classes have been removed and
replaced by a new system using the :valid and :invalid pseudo-classes,
when a parent has the 'was-validated' class. While this system is great,
it is not straightforward to use it in Odoo. Fortunately, BS4 provides
the 'is-valid' and 'is-invalid' classes as fallback. This commit
replaces the 'has-error' and 'has-success' classes by 'o_has_error' and
'o_has_success' classes (for JS compatibility) and use the 'is-*'
fallback classes. (The 'has-warning' class has no equivalent but was
unused in Odoo anyway).
The input-group-addon class has been replaced by a combination of the
input-group-text and the input-group-append/prepend classes. The
input-group-btn class is replaced by the input-group-append/prepend
classes.