Steps to reproduce the bug:
Let's consider that we are in 2019
- Create two customer invoices: I1 and I2
- I1 with invoice date = 2 april 2019 and amount = 100€
- I2 with invoice date = 2 april 2018 and amount = 1000€
- Go to Reporting > Invoices
- Click on widget "Time Ranges" and set "Based on" Invoice Date and "Range" This Year "Compare To" Previous Year
Bug:
The untaxed total for previous year was 1100€ instead of 1000€ because it counted previous year and this year.
opw:1962027
closesodoo/odoo#32331
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The labels Request for Quotation and Purchase Order were not displayed.
opw:1958631
closesodoo/odoo#32281
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Before this commit, the duration_unit view attribute was not present in the gantt RNG
But the JS code in the framework and in Studio allow for modifying it
So, this commit makes it an optional view attribute
OPW 1946216
closesodoo/odoo#32133
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The HSN code is a code that internationally identify a precific product.
Presently each code for each product is print in the invoice summary.
After the fix it does have a dedicated column in the invoice so it is
print along the product is defines.
opw-1941077
closesodoo/odoo#32042
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The field incoterms_id is made redundant by the field incoterm_id introduced in
b5bb5bd421. As such, it has been removed in master at: 569a498d36
We make this field invisible,
and synchronize the invoice incoterm_id with the sale order incoterm.
opw 1935573
closesodoo/odoo#32039
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
- Set an internal location as a return location
- Create a SO with a dropship product, validate and deliver
- Return the product, and choose the internal location as the return
location.
The received quantity on the PO is counted twice.
Since the return is an 'in' move linked to a PO, it is automatically
counted as incoming quantity.
This case is quite specific, so we explicitly add an exception in case
the origin move was a dropship, but the return is not a returned
dropship.
opw-1958228
closesodoo/odoo#32205
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
On the line chart of google analytics account, we have a tooltip with
lines ({date}
sessions: {number of session}) overlapping and going
outside of the modal width.
This does not happen on google examples, the only fix found is to
display the tooltip in HTML instead of SVG.
opw-1961605
closes#32285
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This partially reverts commit e2e27b41ad.
The commit changes the DOM structure in order to pretty print both
amount (value without tax, B2B setting) and total price (value with tax,
B2C setting). Actually having both (B2B and B2C) is a client
misconfiguration and we do not support that, furthermore changing the DOM
structures can break inherited templates.
The said commit was also fine tunning 716ff76, the fine tune is
related the the removal of the dynamic colspan attribute. The section,
note and subtotal should take the entire width of the table, setting the
colspan to an abritary maximum ensures they fill the entire width.
closesodoo/odoo#32194
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Since 2d970942ba it is possible among other improvments to have a
pricelist on all website if it has a "code" or is "selectable" and has
no specified website.
Following this, the default "Public Pricelist" is not associated to a
website but since it is not selectable and has no code, we would get no
pricelist on the website on default installation without demo data.
With this changeset, the "Public Priclist" is set to selectable when
website_sale is installed.
opw-1961069
closes#32254
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Romain Derie <rdedoo@users.noreply.github.com>
- Go to Website.
- Open a Blog
- Try to open the Archives Tree an the right site
(set 'Cuszomize Settings / Archives')
- The tree doesn't open
In Bootstrap 4, and HTML id attribute must start with a letter.
opw-1959770
closesodoo/odoo#32244
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This test also fails before the module extraction commit as the code
translations like the one for 'Ijkl' have no 'module' value during the reimport
and are ignored by the following search
closesodoo/odoo#32022
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When a single po file is processed (i.e. direct po import, not read from a i18n
directory inside a module), there was no module information on code translations
The module information is important for web translations where the list of
modules is given in the call to the route '/website/translations' and
'/web/webclient/translations' and only the web translations of these specific
modules is retrieved and used.
To manually import the translations of a custom module (e.g. openerp_enterprise),
the base.language.import wizard is typically used and the give .po file is
directly imported.
For model and model_terms, the module information is easily deducted from the
the record external id (<module>.<reference>) but for code translation, we
relied on the global variable module_name.
The .po file do contain the module information but this information was ignored.
Real example:
#. module: openerp_enterprise
#. openerp-web
#: code:addons/openerp_enterprise/static/src/js/odoo_enterprise_start_trial.js:249
#, python-format
msgid "Please choose your domain name"
msgstr "Veuillez choisir votre nom de domaine"
Before this commit, the above translation was imported without the module and
was not retrieved in the '/website/translations' call on the /trial page
The global module_name is still used when set for backward compatibility.
Co-authored-by: Raphael Collet <rco@odoo.com>
This code was to be removed in saas-7 (which went the way of the dodo)
project_time_mode_id is now only on hr_timesheet
This was creating an ir.model.data entry with res_id=0 (not record found).
A ir.model.data without id triggers a warning in the trans_generate method when
trying to export the translations of the module project (where the reference
fails to be resolved)
The current style on "Active users: {number}" placed it 60 pixels over
were it should be, so this was:
- overlapping "Visits" title
- not sparing vertical size (since we use "position:relative")
opw-1961605
closes#32245
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
mail.channel module in mail module has the description "Discussion Channel"
(with a capital C) and was overriden in im_livechat to "Discussion channel"
(with a lowercase c).
Installing a module was renaming a field (which is never a good idea, especially
for translated fields)
closesodoo/odoo#32238
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
In fullcalendar, we have in f5b7ad80f fake moments date with UTC time
that are the local time, thus when we move an event to another day, we
need to set it as:
- the selected year-month-day
- the original utc hours (real local hours) -> local hours
- the original utc minutes (real local minutes) -> local minutes
- the original utc seconds (real local seconds) -> local seconds
When it is sent to server, timezone offset will be removed so we will
transfer to server the expected datetime in UTC.
With this changeset we send server the correct time when a fullcalendar
event is "all_day" but the original event was not (eg. drag and dropping
event on the month view).
Added test without change failed with:
- 4. event moved to 27th nov 16h00 +40 hours timezone
(expected "2016-11-29 08:00:00", result: "2016-11-27 16:00:00")
- 5. expected: "event|6|11/27/2016|16:00:00"
result: "event|1|12/09/2016|08:00:00"
- 6. expected: "event|1|12/09/2016|08:00:00"
result: "event|3|12/10/2016|23:55:05"
opw-1955281
closes#32136
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.
This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.
opw 1951369
closesodoo/odoo#32048
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
closesodoo/odoo#32185
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Do not raise if data have been deleted. Since the fields are not
required, do not fallback.
opw-1959184
closesodoo/odoo#32163
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Set the 'Public Pricelist' with 'Discount Policy: Discount included
in the price'.
- Go to the shop and search the product 'iPad Retina Display'
- Add product to cart by using the quick add to cart button
The 'Add to Cart' modal show public price & discount to the customer.
Closes#31378
opw-1944362
closesodoo/odoo#32114
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
On a form view:
- we open a modal form view
- in this modal we open a modal form view
- we close that second modal
=> the modal is closed and the first one is still opened, but on mobile
we can't scroll to above or below the modal.
This is because bootstrap remove .modal-open class on body when we close
the second modal, but this class is necessary to scroll (this is not
much an issue on desktop since scroll is often not necessary).
We already had a fix that was weakened in 02a063fd73.
With this changeset, we keep .modal-open as long as a modal is opened.
Without the change, added test failed with:
10. Modal is said opened (expected: true, result: false)
opw-1948423
closes#32106
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before that, the tag set on this tag for its base amount was wrong; it caused it to be reported in the wrong section in l10n_fr_reports.
closesodoo/odoo#32103
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This reverts commit 5324284f56
This reverts commit ad826f56ba.
If for example we had in a template:
<script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script>
it has been reproduced to be gotten as:
<script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script>
which is unexpected and could cause an error.
closes#32090
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The field `has_tracking` should be read-only, there is no reason to make
it writeable.
opw-1958266
closesodoo/odoo#32080
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
With 953a693df when a route is not found we assume it is a website.page
that can be multilang.
But with #31792 we should once again prefix URL by the language if
necessary.
The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.
With this fix, `#fragment` is not taken into account when searching
route.
related to #31792
related to opw-1922051
closes#32059
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In 10.0 and before, if we were eg. on website page /fr_FR/contact, if
`fr_FR` language (french) is installed and not the default website
language we would have all URL towards translated content (route with
multilang=True) prefixed with /fr_FR/ (the language code).
With 9cd982bcc some improvments were done to CDN but this also breaks
language prefixing, so this cause an unecessary redirect:
- we are on /fr_FR/contact and click on "Shop"
- we go to /shop
- odoo redirects US /fr_FR/shop
With this PR, URLs are prefixed with language once again.
note: the added test is hackish but the function tested depends on a lot
of odoo.http things that are hard to use for test (request.render,
request.context, request.httpreqest).
opw-1922051
closes#31792
Signed-off-by: Christophe Simonis <chs@odoo.com>