- Added taxes for year 2018 of sales and purchase with percentage 3.7 and 7.7
- Added tags to show newly added tax in VAT report(enterprise branch) for Switzerland
Was PR #20851. Was task 39082.
Summernote uses `document.execCommand` to apply most styles when
editing, leveraging the implementation to the browser.
Summernote is configured to use HTML styling (`'styleWithSpan': false`),
and in this case, browsers such as Firefox use HTML attributes for
styling text align, while Chrome still uses CSS for that. In fact,
`document.execCommand` is browser-inconsistent... but so is the
`styleWithSpan` option. Indeed, setting the option to `true` will make
Firefox use CSS property for alignment too... but not Internet Explorer.
So we might consider changing this option's value but this would not
solve the current problem.
Indeed, any CSS `text-align` style in Firefox takes precedence above
the element's `align` attribute, so when users were trying to align text
on stuff that was pre-aligned, they were unable to do so.
We can better explain the situation with this example:
A user tries to left-align in Firefox a `p.text-center` element, and
produces this:
```html
<p class="text-center" align="left"/>
```
(`align` attribute is ignored because of the `text-center` class)
On Chrome, this would be produced with the same steps:
```html
<p class="text-center" style="text-align:left"/>
```
With this patch, we actually make that HTML look like expected by the
user, no matter the browser he's using, by forcing the editor to use
the text-align CSS property. Note that the implementation is quite
ugly but had to take care of compatibility.
See https://github.com/odoo/odoo/pull/20900
(thanks to @Yajo for original PR)
The order of production was first based on "priority DESC" and then
"date_planned ASC".
So for production with the same priority/date_planned the order is not
deterministic.
This commit make the order deterministic as it seems preferred.
opw-784243
closes#21644
Main resource document to be found at https://www.economie.gouv.fr/files/files/directions_services/dgfip/controle_fiscal/actualites_reponses/logiciels_de_caisse.pdf
This document states that only business operations with partners not being subject to VAT should be inalterable and secure.
We adpat the module by differentiating between b2c and b2b journals and apply hashing on the former's moves
Protection against account_cancel is not necessary anymore
By default, this module considers a sales journal being a b2c, thus activating hashing on its move.
Since we can't afford to lose information, when a b2c journal contains hashed moves, its b2c characteristic cannot be changed
[ADD] l10n_fr_pos_cert: module to adapt the POS to the recent French regulation CGI art. 286, I. 3° bis.
The module adds following features:
- Inalterability: deactivation of all the ways to cancel or modify key data of POS orders, invoices and journal entries
- Security: chaining algorithm to verify the inalterability
- Access to download the mandatory Certificate of Conformity delivered by Odoo SA (only for Odoo Enterprise users)
[ADD] l10n_fr_sale_closing: module to store automatically the total of daily/monthly/annualy sales.
(both of the period and cumulative).
This fulfills another requirement brought by the recent French regulation CGI art. 286, I. 3° bis related to the storage of data
Was PR #20581. Was task 29922
When you have e.g. an SO with a product MTO generating a manufacturing
order, and you put the delivery order to done, before the MO is done,
you can not cancel the MO anymore, because the cancel method checks if
the move is not done (and raises an error).
As the user stays blocked in this case, it is better to just not try to
cancel the destination move by not propagating the cancel when the destination
move is done.
opw-786571
Before this commit, you could never get the user's facebook email. Since there
was no email field on facebook response, email would be then set to an auto
generated value like 'provider_2_user_0123456789123456' by odoo.
Now, we correctly request user's email to facebook.
opw-782771
When searching for a partner the ' ' (SPC) character can be used as a
field separator. You can search for e.g.:
'agr namur'
which will return the 'Agrolait, 69 rue de Namur,...' partner.
For some reason only the first space was considered a separator. So
e.g.:
'agr namur belgium'
wouldn't work.
This commit makes it so that every space character is considered a
separator.
Fixes#21357
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.
Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.
This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.
Fixes#21348
Mixing positive and negative values in a pie chart is not possible.
However, in this case, a crash occurs instead of displaying an error
message.
opw-786137
Before this commit, it was not possible to save a page
containing a snippet with a SVG tag.
To support SVG elements, we need to use 'Element.getAttribute'
and 'Element.setAttribute' as mentionned in the documentation:
https://developer.mozilla.org/en-US/docs/Web/API/Element/className
For more information, see GH-14485
Before this commit:
1. If user wrote text in the quantity field to add to his cart, it would crash
and show a server error.
Now, if the user insert a non-valid quantity in the field, we set it to 1
Step to reproduce:
With website_sale only
- Go to a product page on the shop
- Insert 'abc' in the quantity field and click 'Add to Cart'
- Server will throw an error 'Can't parse float..'
With website_sale_options
- Go to a product page on the shop
- Insert 'abc' in the quantity field and click 'Add to Cart'
- Popup confirmation with optional product will show with 'NaN' in the qty
- Click 'Proceed to checkout'
- Server will throw an error 'Can't parse int..'
2. On the checkout, if user typed text in qty field it would create infinite
quotations.
Some modules (eg: website_event_sale) would hide this behavior because they
override the RPC call to '/shop/cart/update_json' and throw an error on the
RPC.
Now, if user type incorrect integer quantity, we set the quantity to 1.
Step to reproduce:
1. On base (website_sale only)
- Add an item to your cart
- On checkout page, set qty to 'abcd' or whatever text
- Check your browser console, every 500ms their will be a RPC call
- Check your quotations in backend, their will be a new one every 500ms
2. On db-all
- Add an item to your cart
- Set qty to 'abcd' or whatever text
- Check your browser console, it will throw an error on the second call
This closes#20482, closes#20904
It's needed in phantomjs tests.
Without this commit it printed only error stack, which doesn't provide enough
information to fix it. This is a problem when the error is not reproduced on
running tours manually in browser.
In the case where:
- you are too fast editing a mass mailing, trigger an onchange (e.g. mailing_model) and then save
You can use the edit/save shortcuts to make yourself believe you are Flash Gordon
- your internet is too slow (Down: 4Mb/s, Up: 500kb/s, Latency: 20ms)
Before ths commit, the onchange will return *before* the field (the iframe actually) is loaded.
This onchange contains a signal *in* the body_html of the field to allow communication with the iframe.
If you save before the iframe is loaded, this body_html keyword will be saved.
After this commit we deactivate the save button until the iframe is loaded.
We could have gone for a python user error on the value of the body_html too.
But it would have added a supplementary click and potential reloading
OPW 783616
Before this commit, when an user added a video in his page (an <iframe>)
it was then duplicated each time the snippet in which the video is was
edited and saved again, slowing the page loading.
As the code responsible for that is quite outdated, it should be
reviewed and refactored in master. This commit only fixes the problem
with more code. This commit will also fix existing databases, if the
user edit the video snippet once again.
(Note: even if this commit's code will be even more strange in master,
it *should* be forward-ported anyway).
When the keypress handler is called the pressed key has not yet been
added to this.value. This leads to the search being performed with
e.g. 'Agr' when the user has typed 'Agro'.
Fix this by getting this value when the timeout expires. At this point
the value will be updated.
Fixes#21129
When grouping a graph view by a selection field, the labels on x axis
were the selection values themselves (not their corresponding label).
This issue was only present if there was only one group by field. In
this case, the attribute `grouped_on` is not an array but a string
containing the field name. This case wasn't correctly handled.
Note that this issue is not present in the new views (from saas-16).
Closes#19790
SAP sends out emails that only contain a PDF part, without a text or
html body, e.g.:
X-Mailer: SAP NetWeaver 751
Content-Type: application/pdf; name="Afleveringsbewijs.pdf"
Content-Transfer-Encoding: base64
Content-Description: Afleveringsbewijs
Before this patch, this single non-text part was parsed into the body of
the final message, as if it was a text part.
Making the check for the main part more restrictive solves the issue, as
there is no reason to assume that a non-multipart content is
necessarily of text/* type. This PR also includes a regression test.
Closes#21102
Suppose some taxes with the same sequence:
The tax are not computed in the same order in POS and SO/INV.
This is wrong in case of multiple taxes affecting the base.
-opw: 779498
Before this commit, the posbox was built and in the process the permissions of the repo were whanged
As a result, there was a diff in the repo, making it un-upgradable
After this commit, the permissions on the posbox' Odoo repository are unchanged, and no diff is to be seen
Before this commit, the latest version of Raspbian was chosen.
It is not very helpful though as if something goes wrong, we don't on which part it is.
Also, fix python dependencies for the image
commit b4ec51021b forgot about the case where no domain was supplied
or when the conditions on it were not fulfilled.
before this commit, a traceback was thrown and no event was shown
After this commit, no errors and all the relevant events are shown
opw 782985
When logging multiple elements in one log call in the new Firefox
version, all the elements are kept on one line. So if the second
element starts with a line feed, it will not go under the first
element but still be at the right of the first element, on a new
line.
If we have a payment in october and a statement in november and the lock date is 1st november, we can't reconcile both because we try to write statement_id on payment but there is the lockdate constraint. This is not correct and we should be able to reconcile both even after lock date as it is the case for other moves.
backporting 76b724294a
OPW 779208
closes#20996
original commit message:
Add a 3 use cases with tests that were failing before.
datetime filters were not working correctly on stop filters
The `_get_recurrent_date_by_event` was only computing recurrency on the start
field of an event which can make a difference. A recurring event
start=2017-01-01 09:00:00; stop=2017-01-01 10:00:0
was not matched in a search ('stop', '>', '2017-01-01 09:30:00')
The filter != was not handled in the recurring use cases.
e.g. making the search 'start is set' in the web client is equal to
('start', '!=', False)
Searching with only a start filter matching recurring events but not the
first ("real") occurence, was returning no result if no stop filter was present.
start=2017-01-01 09:00:00; count=5
had no result in a search ('start', '>', '2017-01-02')
Before this commit, if you go on /shop/cart and your cart is empty, it will
show the total (Subtotal, Taxes, Total) as $ 0.00.
Indeed, the code is retrieving a 'sale.order' if you are connected and you
already have a draft sale order on DB (eg: you just add something to cart and
emptied it afterward).
- Add product to your cart and proceed to checkout
- On checkout cart, remove the product, your cart is now empty
- Reload the page (you should still be on /shop/cart) or go to /shop/cart
- You now see the zero prices (Subtotal, Taxes, Total)
Now, we will hide this if you have an order but no line on that order.
This closes#20896
Go to Report -> Operator Analysis -> Apply group_by 'Creation date
(hour)' => traceback.
`start_date_hour` is implemented for Livechat Support Report on
Channels, but not on Operators.
opw-782255
... gives wrong values due to the timezone.
For instance, let's assume that the browser timezone of the user
is UTC+2, and the user types 10/09/2017 10:00:00 in a searchview
with a datetime field in its arch (i.e. which autocompletes on a
datatime field). Before this rev., the suggested value was
10/09/2017 08:00:00, i.e. the timezone offset was substracted from
the value.
PostgreSQL 10 move sequences' metadata fields into a new `pg_sequence`
system catalog. As a result, selecting from a sequence relation now
only return three fields, and does not include the `increment_by`
metadata field anymore.
This patch obtains the `increment_by` value from the new system catalog
for PostgreSQL server versions >= 10.
Fixes#20269
Before this commit, when starting a livechat session as a public user and continuing as a portal user, the conversation was lost
(the poral user couldn't see previous messages posted as a public user)
After this commit, the conversation is kept and security insured by the uuid in the cookie
OPW 775568
closes#20279
In case we are not uploading a file but add a slide based on google doc url
or youtube link, post['datas'] is not set and the code will crash.
Javascript don't check the onError, so the user never see the error and wait
that nothing happend.