This way, it can be used without having to add the dependency to
`base_vat`. For instance, in `account_edi_ubl_cii` in
`_import_retrieve_and_fill_partner`.
This commit essentially backports part of commit
212be2920affdab5baf14b3025ef31ee2d6a652b
closesodoo/odoo#136950
X-original-commit: 32e72ef26f033cf7701d7d797738688a339d9b77
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
Handle payment terms for UBL as described by the Belgian Peppol
Authority and documented by VBO-FEB.
In case of early payment discount (for instance 2% if payment within 7
days):
* add one document level allowance per VAT rate (this allows to reduce
the tax base amount to take the discount into account)
* add one document level charge exempt from VAT (the amount of this
charge is the amount of the discount the customer can get by paying
early)
* Recompute the document level TaxTotal accordingly
Hence, nothing changes for the invoice lines. Importing the xml is then
convenient since each document level AllowanceCharge will create an
invoice line on top of the existing invoice lines. The total amount of
the invoice will be the amount to pay in case of no early payment
discount. To get the total amount to pay in case of early payment
discount, simply remove the document level charge.
References:
https://openpeppol.atlassian.net/wiki/spaces/Belgium/overviewhttps://efactuur.belgium.be/sites/default/files/3.%20Cash%20discount.docx
opw-3235769
task-3326963
closesodoo/odoo#136635
X-original-commit: 80bb997d7ecab208e6ca9719114cf9ae3c31f505
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
This commit fixes the overflow of content title on without fullscreen view(Exit-
Fullscreen) of content page by cropping the title and adding '...' at end.
Task-3384661
closesodoo/odoo#136939
X-original-commit: 09244c59f1681f9222abbbe347b24baacc8483b0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Description of the issue/feature this PR addresses:
-In the project module when the calendar view of a task is open click on any
schedule, and popover is open.
-In popover tags colors are not visible
Current behavior before PR:
In the popover, tag field colors are not visible
Desired behavior after PR is merged:
tags colors are visible when opening the popover
Fix:
we add options attribute in the many2many_tags widget.
task-3269548
closesodoo/odoo#136910
X-original-commit: 64cbac9b3d4c686368195a44a45566c9278376b4
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit changes the default label of the graph view's axis to None
instead of undefined.
task-3519566
closesodoo/odoo#136822
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
Add a new button Relocate on the stock.quant views.
This button appears when selecting 1+ quants and allows to create a stock.move to another location.
This button also allows to change the package of the quant(s) selected.
LIMITS:
- if a quant has reserved quantities, it will unreserved along with the related smls
- if a package is not fully moved to a new location, the quants selected will be unpacked
- no intercompany moves are allowed
- only available for stock manager roles
Addendum: there are 2 functions with almost identical names:
- action_set_inventory_quantity_to_zero
- action_set_inventory_quantity_zero
renaming action_set_inventory_quantity_to_zero to action_clear_inventory_quantity to make them easier to differentiate
task 3346212
closesodoo/odoo#124501
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
The prorated MRR displayed in the kanban header of CRM's forecast resets
to 0 when moving leads from one column to another
Steps to reproduce:
1. Install CRM
2. Go to Settings > CRM and enable Recurring Revenues
3. Go to CRM > Reporting > Forecast
4. Open a lead in the first column and set a recurring revenue and a
recurring plan (after the "+" in the expected revenue)
5. Go back to Forecast, a value is displayed after the "+" next to the
progress bar of the first column
6. Change the column of the edited lead, the prorated MRR of all columns
change to 0
Solution:
ForecastKanbanController should extend crmKanbanView.controller
Problem:
The ForecastKanbanController extended the generic KanbanController so it
didn't inherit from the crmKanbanView.Controller override of the getter
`progressBarAggregateFields` that adds the prorated MRR to the fields
used in the progress bar
opw-3463826
closesodoo/odoo#136929
X-original-commit: bab34140725a014995d9374ec0994399776ce4aa
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
On a neutralized database, all the IAP accounts should be disabled,
including new ones.
closesodoo/odoo#136872
X-original-commit: c7a1d53f286c2f0e928922e9c59dbb804adc06bf
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
Some pages don't have an image for the sharer. This wasn't too critical,
as the code to retrieve the image was written in JQuery and didn't cause
any problems if no image existed.
```
$('meta[property="og:image"]').attr('content')
```
If there is no element matching the selector, it returns `undefined`.
[This commit] was merged and migrated the JQuery code to vanilla JS.
```
document.querySelector('meta[property="og:image"]').content
```
If there is no matching element, it throws an error (we can't read the
content on undefined).
This commit keeps the vanilla JS code but prevents the error if there is
no image to share. In addition, for this master commit, we took the
opportunity to refactor the code.
Steps to reproduce the bug as an admin:
- Go to /slides and click on "View" next to the user's name
- Edit the page
- Drop the share block on the page
- Save the page
- Click on the Pinterest share button
=> An error appears on the screen.
[This commit]: https://github.com/odoo/odoo/commit/ddb2c06be4196c86ff6a2fd74874487d75b31c94
opw-3326724
closesodoo/odoo#136737
X-original-commit: 66651fabcc36e8d5f455c08d5bffb9036bef8d3c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The border radius on an active shape in its menu was making a weird
gap between the element and its border. This commit fixes this gap by
using an outline on the active state.
task-3503975
closesodoo/odoo#136871
X-original-commit: 0c4816e1b4996b6e3048b3061c6e2cff06eeb499
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The negative margin used for the colorpicker was creating a weird
spacing when we use the oval shape image or if we have a button group
without the colorpicker. This commit adapts the margin on the element
itself by overriding it with an !important instead of relying on a
negative margin.
The dropdown caret from the colorpicker dropdown was misaligned, it
happened because the default CSS rule for we-select had priority due
to more specific selector. This is fixed by making the selector more
relevant to take priority over the default rule.
task-3503975
X-original-commit: 2f81c6ae68751d5f93c30aef822730ee04ead391
Part-of: odoo/odoo#136871
Co-authored-by: bvr-odoo <bvr@odoo.com>
In enterprise, when doing a comparison between multiple periods with values carried over to them, auditing the carryover values (through the dedicated button in the popup, in debug mode) always opened the latest period.
This was due to the fact the main options of the report were directly used, instead of the ones corresponding to the column group owning the value.
closesodoo/odoo#136868
X-original-commit: e80680e47218f2109c0ba599d4a1f41651f65c62
Related: odoo/enterprise#48030
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
*: website_forum, website_slides
Purpose
=======
Website profiles of users like Mitchell Admin, which are set as "public",
are also rendered as "Private". In Fact, users can be denied access to
the public profile of other users for different reasons. In such
situations, users should get a more accurate feedback on the reason of
the access denial.
Specifications
==============
On profile access denial, give users a more accurate reason:
- "This profile is private!" when the profile is indeed private
or the karma of the user profile is equal to 0.
-"Not have enough karma to view other users' profile." when the profile
is public but the requesting user has insufficient karma rights.
Also:
- Redirect to the 404 page users trying to access a non-existing
profile.
Note: the minimum level of karma required to access a public profile is
now editable. See odoo/odoo#123411
Task-3360050
closesodoo/odoo#128686
Related: odoo/upgrade#4955
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Also, "Short Name" for duplicated warehouses was set to "COPY", because
of the 5 char limit which doesn't allow appending " (copy)" to the
original value.
closesodoo/odoo#122511
Task: 3290154
Related: odoo/upgrade#5138
Related: odoo/enterprise#42541
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Rationale: if our users want to do a pick-pack-ship manually, they were
unable to duplicate pickings by just changing the operation type.
Task: 3290154
Related task: 3010731
Part-of: odoo/odoo#122511
Some clients use the same barcode for products in different companies,
with different configuration. It is inconvenient for those users to have
to ensure the uniqueness of barcodes across all companies.
This commit will allow products to have duplicated barcodes, as long as
they are assigned to different companies. Products without a company are
treated as belonging to all companies. Product variants require unique barcodes.
The validation needs to be triggered both on barcode and company_id, so
product template (where company_id is stored) was also adjusted.
NOTE: when a barcode is duplicated in 2 companies, an attempt to remove
both the company and the barcode from a product will result in an
error, despite the fact that a product without a company and a barcode
would have a correct configuration. This happens because the barcode
uniqueness check is performed before changing the barcode, but after
changing the company. A workaround for this problem is to remove the
barcode first, save the product, and remove the company.
Task: 3290154
Related task: 3270732
Related: odoo/enterprise#42541
Part-of: odoo/odoo#122511
List of transfers shown in the Batch Transfer form was using a simplified
view, without proper coloring etc. That list was removed, so now the
default list of transfers is used and the view is more consistent.
The change is applied both in the Batch Transfers form (in the "Transfers" tab),
and in the popup visible after clicking "Add a line" button.
Task: 3290154
Related: odoo/upgrade#5138
Part-of: odoo/odoo#122511
The reason is to make it consistent with other places where we display locations,
where lot/serial number is placed next to the source location. Initial requirement
was to move lot/serial number in between "From" and "To", but PO decided to move
it before "From", as it should be more convenient for users.
Task: 3290154
Part-of: odoo/odoo#122511
Product's display_name can be too long and might not fit in small
labels. A decision was made to split it into default_code and actual
product name, and display both in separate lines.
Unfortunately, the logic of joining those 2 strings is embedded in the
model, so it had to be duplicated in the label.
Task: 3290154
Part-of: odoo/odoo#122511
This commit fixes a bug where popovers could stack up in kanban if one
kept opening them. By changing the event to close popovers from a
mousedown event to a pointerdown event, it is no longer stopped by the
draggable hook and executes correctly.
closesodoo/odoo#136890
X-original-commit: 76665eb400168a6fd6e2b5f5fe099c8c4e9c8a5e
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
__Current behavior before commit:__
The page crashes when we try to merge two partners and the
`mail.activity.mixin` model has a field with `ttype = "reference"`.
This is because a `search()` on a `mixin` model will always crash as
they are abstract class that don't represent real records.
__Description of the fix:__
Add a check to skip the iteration if `Model` is an abstract class (like
a mixin).
__To reproduce:__
1. Go to Settings > Technical > Fields
1. Create a new field
1. Set **Model** as `Activity Mixin`
1. Set **Field Type** as `reference`
1. Go to the Contacts app
1. Select two contacts
1. Click on Action > Merge > MERGE CONTACTS
opw-3458640
closesodoo/odoo#136880
X-original-commit: cb7589cb4bb3ede1b4c4d3f8d04c376a95d42247
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
Current behavior:
If a PoS had a different currency than the company currency, the total
due was not converted in the PoS currency. So when you paid the total
due it was not the correct amount.
Fix:
The total due is now converted in the PoS currency when the PoS is
loading the data. We also had to change the refreshTotalDueOfPartner to
retrieve the total due in the PoS currency.
Steps to reproduce:
- Create a PoS that uses a different currency than the company currency
(change the journal, pricelist and payment method)
- Make some payments with this PoS using the customer account
- Check the total due of the customer account in the PoS, it's not the
correct value.
- Try to pay the total due, it's not the correct value either.
opw-3469682
closesodoo/odoo#136528
X-original-commit: 4a2dc18eca0fe2e8095f6402e157320cac8985ad
Related: odoo/enterprise#47851
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Before this PR, when there is no shipping address, the pdf show an empty
"Shipping Address" header. By changing the colspan dynamically we can manage to
keep the layout like it was and remove the useless section.
closesodoo/odoo#134435
Task-id: 3262408
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
The return type of _do_request is inconsistent when an error is
encountered. This causes issues when the callers expect the return
type to be a dictionary consistently.
We fix this by always returning an empty dictionary for the request
response when encountering an error
sentry-4339147124
closesodoo/odoo#136881
X-original-commit: f8ac76906d1eec2ad1bc1243f60998fe50caa1bc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Reproduction:
1. Create a link right after some text
2. Remove the whole line by backspace character by character(this should
give the p element a history steps id)
3. Try to create a link again
4. The new link is invisible and actually created in br when inspecting
the page
Reason: this is an edge case on Chrome that the document.getSelection()
returns a selection which has br element as the anchorNode. It may
happen when the parent element of the br has history steps and only has
this br element. However, the same steps done on Firefox return the
correct selection on the parent element.
Fix: we make a special case when the selection is a caret type and the
anchorNode is a br element, we re-select the parent element and collapse
the selection to the start. This is trying to mimic the normal case of
adding a link to an empty p element, e.g selection anchorNode is p,
offset is 0.
task-3181486
closesodoo/odoo#136879
X-original-commit: 084ac2a375224288f182961ff98915dbeb428bd6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
Before this commit:
when performing a shift paste of copied VS Code content, the indentation was
lost.
After this commit:
Now, when you perform a shift paste of copied VS Code content, the indentation
is preserved
Task-2884491
closesodoo/odoo#136867
X-original-commit: 1641bb50aa30ac64340eb261b26d4706944299ba
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When the limited product loading option is enabled in the PoS config,
the Top-up eWallet product was not loaded into the PoS. This caused
an error when trying to process an eWallet refund from the PoS since
the Top-up product was missing.
This commit ensures that the Top-up eWallet product is always loaded
into the PoS regardless of the limited product loading setting.
opw-3510639
closesodoo/odoo#136865
X-original-commit: 8eafd156f4a4a8680709feef8b38cbead39957f6
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before this commit:
The text moves back to the left side on remove format even if the direction rtl
is applied.
After this commit:
The text will not move to the left side on remove format if the direction rtl is
applied.
task-3482193
closesodoo/odoo#136849
X-original-commit: ff955e2cf74189a7cd4b175e8edfe5cfc8f31821
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Add a new column, after tasks that shows the following information :
Tasks: Total done tasks / Total tasks (ratio in percentage)
Timesheet: Hours spent/ allocated hours (ratio in percentage)
\> visibility: only show if the timesheet setting is activated.
Right side panel :
Add the Done icon before Tasks
Add hours spent/allocated hours information under the Timesheet
Extra time: Add a new stat button that shows
the overall extra time used for the project.
visible if hours spent > allocated hours.
By clicking on this it will redirect to the same view
as we have for the timesheet stat button.
task-3432102
closesodoo/odoo#129177
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Reproduction:
1. Install mass mailing
2. Create a mailing with multiple Cover blocks, and replace each
background image by uploading one. In the inspector, you should find the
`data-bg-src` attribute
3. Send the mailing to a Gmail account (or check the sent email on a
local odoo instance), the email is with the long `data-bg-src` attribute
Fix: The fix is put into the existing flattenBackgroundImages function
because the background images are selected and `data-bg-src` is for the
background images. It simply removes this redundant attribute
task-3484103
closesodoo/odoo#136837
X-original-commit: b43d3c091c7f590bb8128dfc922345ad4dbb13dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
Description of the issue/feature this PR addresses:
In Dashboard module tasks section, two scorecard is showing same label
'Time to Assign'. Another scorecard is for closing day so that its label should
be 'Time to Close'.
Current behavior before PR:
two scorecard showing same label 'Time to assign'
Desired behavior after PR is merged:
label is change for one scorecard to 'Time to Close'
Fix:
Rename title of scorecard in json file.
task- 3346509
closesodoo/odoo#136739
X-original-commit: b023b44c699464a09ffc7fe6d9b049ed8ec9148a
Related: odoo/enterprise#47971
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce the bug:
- Create a storable “P1”:
- tracking= serial
- save
- Change the type of product to service
Problem:
some fields for tracked products are not hidden, because the product
tracking is not updated.
Solution:
Convert _onchange_type into compute methods.
The tracking is updated even if the change type is applied from the
"product.product" form.
opw-3499976
closesodoo/odoo#136738
X-original-commit: 22fe0ee4764705e55e81f62e07d29fc9bd8296e1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps:
- Open Website > My Account > Projects
- Open the project in which the customer is not set
- Now perform 'group by customer' on that project.
Issue:
- A blank line is shown below the header line.
Cause:
- No condition is applied to it when we do not have a customer set.
Fix:
- Adding condition to display 'No Customer' instead of an empty block.
closesodoo/odoo#136734
Task: 3461563
X-original-commit: 0649a1d12ef9ecd5ff680679eb2c6151287cc22e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>