Commit Graph
134663 Commits
Author SHA1 Message Date
Simon Lejeune d0fc2ecfaa [FIX] stock: unlink zero quants
If you create a quant through the inventory mode of the list view and
you don't set a quantity, the quantity is null and the quant isn't
unlinked by _unlink_zero_quants.

Also consider null quantity as 0.

We don't have the issue for the reserved_quantity field since this one
is not nullable.

closes odoo/odoo#48005

X-original-commit: 08e428458aa545b3602c56b6866a447126cf8825
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-19 10:56:36 +00:00
Cedric Snauwaert 5b7cff06f7 [FIX] account: don't recompute ending balance of last statement
Previously a task was created to prevent holes between bank statement,
meaning that starting balance should always be the same as previous
ending balance. The goal was that during synchronization or imports,
we could add statement lines in previous statement and not have to
recompute manually the full chain of starting and ending balance of
next statements entries. This works fine with online synchronization
as we always write after creating the statements the balance
of the account on the latest statements to detect missing stmts,
however if we create stmts by hand, it is possible that we have the
following case:

Statement on 10 January with a starting and ending balance of 100 and 200
respectively. We are missing 2 statements with a line of 50 each before that
date. So we create the first missing statement at date: 8 January with a
starting balance 0 and ending balance 50, this will recompute the starting
and ending balance of next statement and overwrite the values to 50 and 150
(starting and ending balance respectively). At that time the system will say
that everything is normal but we are still missing a stmt and we are not seeing
it.

The way to fix this is by not touching the ending balance of the last
stmt entry during the computation, that way we can still detect that there is
an error and that 50€ are still missing.

closes odoo/odoo#48000

X-original-commit: b97b4f4217989e8cae5c32be0d62c11d36eaf1d7
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-03-19 10:30:43 +00:00
Cedric Snauwaert eee8ecdc02 [FIX] account: fix rounding error in is_valid_balance_start check
Field is_valid_balance_check is used to display a warning in case
starting balance of a bank statement is not the same as ending balance
of the previous statement. However the check was done without rounding
resulting in some error in the following casse:
starting_balance = 10.00000001
previous_ending_balance = 10

X-original-commit: 6673d23cfdee97b1e5e6368bc527a9a784578977
2020-03-19 10:30:42 +00:00
Nicolas Martinelli 3590efa478 [FIX] stock_account: no analytic info on COGS
- Create a FIFO product, Automated
- Make some stock
- Create a SO, add the product
- On the SO, add an analytic account
- Validate the picking, create the invoice
  => the analytic info are propagated to the invoice, as expected
- Validate the invoice

The analytic info is propagated on the COGS entries, in particular the
the output account, which is incorrect.

Lost forward-port of 24c7efc8fef63437ac28883b29ed84809234ed76

closes odoo/odoo#47995

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-19 10:17:58 +00:00
Romain Derie e7ef57f687 [FIX] website_blog, website_event: prevent wrong meta og:image URL
Without this commit, if the cover properties's background-image contains single
quotes in the `url()`, that will lead to 404 image in SEO dialog.
It will also lead to wrong og:image in the DOM.

Before:
`<meta property="og:image" content="'website_blog/static/src/img/cover_1.jpg'"/>`
Now:
`<meta property="og:image" content="http://localhost:8069/website_blog/static/src/img/cover_1.jpg"/>`

This is the case for all our demo data.

closes odoo/odoo#47994

X-original-commit: 2338f8ecc8c21299774e288ab07bb084a58cc7ab
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-03-19 10:15:37 +00:00
Julien Mougenot 22e583a882 [FIX] stock: fix traceability action traceback
Before this commit, the control panel of the stock traceability report actions was
updated before being instantiated.

Now, only the props of the control panel are updated before its first rendering.
Added a test asserting that the action is properly working.

closes odoo/odoo#47823

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-19 10:24:54 +00:00
Pierre Paridans eb724d9add [FIX] mail: correctly parse datetime returned from server
When a user is Out-of-Office, the return date is displayed as "Invalid
date" on Safari (both iOS & macOS).

The parsing of the date returned by the server was done using the Date
constructor and passing the string as-is. This constructor delegates the
parsing to the `Date.parse` method. But the DateTime format used to
stringify dates in Odoo doesn't fully follow the ISO 8601, as required
by `Date.parse()`:

expected format: "YYYY-MM-DDTHH:mm:ss.sssZ"
actual format: "YYYY-MM-DD HH:mm:ss"

Also, Safari applies more strictly to this requirement than Chrome &
Firefox, resulting in a parsing error in the former browser.

This commit fixes it by using the utility function `str_to_datetime`
from `web.time` to correctly parse this date, independently of the
browser used.

NB: as this issue is browser dependent, no test has been added.

References:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
https://tc39.es/ecma262/#sec-date-time-string-format

Task ID: 2198486

closes odoo/odoo#47987

X-original-commit: b85a44aea9617b9018dd80d5f8159354bbc88f09
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-03-19 09:38:07 +00:00
Xavier Morel fe376d50d0 [FIX] core, base: leftover deprecation warnings
* from collections import <ABC> is deprecated, unclear why the
  deprecation warning didn't appear before (possibly only appears in
  3.7/3.8?) either way `collections.abc` should be 3.3+ so switch
  everything to it.
* add some more ignores on third-party packages deprecation
  warnings (meh)
* while at it, mitigate generation of non-breaking space on some
  versions of Babel (in the french locale used by our tests anyway)

closes odoo/odoo#47581

Related: odoo/enterprise#9214
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-03-19 09:32:21 +00:00
Siddarth Gajjar 41822a5022 [IMP] web: improve height of input inside oe_title > h1
studio now supports adding of oe_avatar, in few cases oe_avatar field is added
inside oe_title > h1 and while input is also inside h1 so height of input
increase as we have image tag as a sibling, to fix this set height of input
to fit-content.

task-2172320
Closes #47968

Related: odoo/enterprise#8176
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-03-19 09:16:50 +00:00
Dharmraj Jhala 7557ac299b [FIX] web: properly set page data in 'ModelFieldSelector' widget
When passing a default field chain to ModelFieldSelector, the page data is
not set correctly for the relational field. To understand the issue :

- login to master enterprise all db branch in runbot (debug mode recommended)
- create a mass mailing, add subject, select 'Contact' in `Recipients` field
- click on domain selector and select 'Company' from ModelFieldSelector popover
- click somewhere else to close the popover
- again open domain selector and observe the popover

Current behavior : fields of  `Contact` are visible in the page even thogh
                   `Company` is selected in the ModelFieldSelector
Expected behavior : fields of `Company` should be visible in the dropdown page

This commit fixes the issue by correctly pushing the page data
in ModelFieldSelector.

task - 2058702

closes odoo/odoo#39548

Related: odoo/enterprise#5370
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-03-19 09:21:20 +00:00
Julien Mougenot 9cf534f577 [REF] web: properly wait for services to start
When using a mock environment, some services are started and need to be loaded
for some tests to work as intended. Before this commit, we waited for the result
of the `start` method of each service to be resolved. This was flawed because these
methods are all synchronous, so the awaiting period was actually a single microtask
tick.

To clarify this and still make sure that the asynchronous services have enough time
to load properly, the `Promise.all` has been replaced by an Owl next tick method
(with animation frame request).

Consistently waiting for services to be fully ready does not make sense anyway as
we may want to mock a delay during the starting mechanism.

closes odoo/odoo#47865

Related: odoo/enterprise#9328
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-18 14:51:36 +00:00
Julien Mougenot c9ce8a07e1 [REF] mail: update discuss helpers
Update the 'createDisuss' helper to be appended to the DOM using 'dom.prepend' to
benefit of its 'on_(attach|detach)_callback' calls. This allows the mail test suite
environment to be closer to the actual action behaviour (having those methods called
each time it is created/destroyed).

Some tests in which these methods were manually called have been adapted.

Also, one of the tests was destroying the action too quickly and exposed an issue
within the Discuss action, in the 'on_detach_callback' method. It has thus been
fixed as well.
2020-03-18 14:51:35 +00:00
Lucas Lefèvre 3ad4abe171 [IMP] sale: Change default invoicing policy
Purpose
=======
The default invoicing policy should be based on the delivered quantities
by default because:
- In countries with anglosaxon accounting, that's mandatory
- Even for other countries, it's probably as frequent as the "based on ordered"
  quantities

Task 2159161

closes odoo/odoo#47526

Related: odoo/enterprise#9355
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-19 07:44:40 +00:00
Lucas Lefèvre 32b9c4a585 [IMP] sale, sale_stock: Raise better error message
Purpose
=======
If a user try to create an invoice without any "invoiceable lines";
an error is raised. The error message does not explain what to do to fix
the error.

Specification
=============
Explain in the error message what actions the user could do to fix the issue.

Task 2159161
2020-03-19 07:44:40 +00:00
Ravi Singh 4511098d19 [FIX] web_editor: properly hide custom opt from colorpalette if required
Part of https://github.com/odoo/odoo/pull/45093
task-2151408

closes odoo/odoo#45093

closes odoo/odoo#47961

X-original-commit: b5ee7905cd08c9a4d18dbe55f52b9f8ea84d23d3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-18 19:52:33 +00:00
qsm-odoo 98c8438f52 [FIX] website: restore top menu transparent color option behavior
The option was not adapted correctly to the new left panel option
system, especially: not adapted to the use of a dedicated colorpicker
widget.

Part of https://github.com/odoo/odoo/pull/45093
task-2151408

X-original-commit: 39ed330ba635af7c81f03df2fdfe4309c95e05d9
2020-03-18 19:52:33 +00:00
Goffin Simon ba5253c7e0 [FIX] stock: Quick Create enabled for company field
This could be a problem when a user typed in the company name and made
a spelling or spacing error and just pressed the enter button.
A duplicated company was created without the knowledge of it.

opw:2215449

closes odoo/odoo#47916

X-original-commit: 66893a196fdf66f99b7e1c8ac03c023a4dd095e2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-18 13:15:31 +00:00
jbw d2c1043d0e [IMP] account_move : display "Post Automatically" on vendor bills
As we already have the Post Automatically concept in account.move, we want to be able to use it for vendor bills.
This way, e.g. one can prepare all it's office rents bill for the year and everything will be automatic..
Other changes :
- auto_post reset to False when move is canceled
- auto_post set to readonly in view when state != draft

Task : 2200743

closes odoo/odoo#46218

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-03-05 13:44:20 +00:00
Thibault Delavallée 6c28c82b62 [FIX] website_slides: do not allow to begin certification of archived slides
If you archive a certification while being member of the source you still
have access to the "Begin Certification" button. Indeed you can see the
certification as you have rights to do so (publisher, manager) but trying
the certification will crash as it is not allowed for archived slides.

Instead in archived mode the "Test Certification" button is displayed that
allow to make a test entry even for archived surveys.

closes odoo/odoo#47956

X-original-commit: 10abdf711ac7d0aee7d6eab4e30b08acd38eaa23
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-18 18:41:01 +00:00
jerome hanke (jhk) e58db3ff5c [FIX] web: graph view ignores duplicate labels
Steps to reproduce:
- install recruitment
- go to recruitment > configuration > job positions > duplicate a job
and keep the exact same name as the original > change the department
- add any application to the newly created job position
- go to recruitment > applications > all applications > select the
graph view > group by job

Previous behavior:
you only see one of the two jop positions with the same name
the graph view does not handle multiple labels with the same name
and only keeps the latest values when rendering

Current behavior:
duplicate labels are suffixed to prevent the view from confusing them

opw-2214284

closes odoo/odoo#47948

X-original-commit: a77086f8bcb4498361d1183ba8af3d0663cd031b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-03-18 17:22:59 +00:00
Denis Ledoux 20e713bb27 [FIX] base: fix oversight during fp #47851
closes odoo/odoo#47965

X-original-commit: 8efb8b7c80865a739e480259a893dddbf19c0f63
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-03-18 21:46:16 +00:00
Aaron Bohy f79f9c5133 [FIX] web: report client action: mount control panel
Before this commit, the 'mounted' hook of the control panel in the
report client action was never called, because of a missing call
to '_super'. As a consequence, the 'Print' button wasn't displayed.

closes odoo/odoo#47940

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-03-18 16:07:16 +00:00
Thibault Delavallée ce77c64e63 [FIX] mail: fix typo in additional
Task ID 2211781

closes odoo/odoo#47937

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-18 15:38:22 +00:00
yhu-odoo 86f091c0c6 [IMP]stock,product_expiry: improve error message for sn number check
=======
PURPOSE
=======

Improve duplicated serial number message to show more information.

=======
SPEC
=======

In this commit, we show full information about all invalide product name
and lot/sn number when the user enters duplicated ones.

- Change the sql constraint for checking duplicate sn/lot to python
constraint to support customised error message.
- Create lot in batch to show all invalide ones in error message.

=======
LINKS
=======

task 2083605
pr #44366

Related: odoo/upgrade#954
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-17 12:40:26 +00:00
Thibault Delavallée 41b83e425b [FIX] slides: add mising rights for eLearning managers
Full rights were not granted on technical models for managers leading
to issues notably when archiving.

Followup of 90bf317c01

Task ID 2219806

closes odoo/odoo#47911

X-original-commit: c78553340008c1094bfc2c4dd554c5ad5f368fe9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-18 12:39:11 +00:00
Olivier Dony 5f4ac9ea6d [FIX] website_forum: fix permissions for tag notifs
Forum users can follow tags and will be notified when a new post
includes the tag. However the person posting it does not have access to
the list of followers, so the notification would fail with an
AccessError. The OP would get a 403 page and the post would not be
posted.

closes odoo/odoo#47907

X-original-commit: 2b2b8484cefc4b2cfdf1023fb8209e70eef5ec24
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-18 11:53:38 +00:00
Mitali Patel b47aa1b005 [IMP] account: update incoterms list
Purpose of this commit is to update incoterms list
base on new incoterms guidlines and add incoterms in RFQ/PO
and invoices/venderbills reports

task-2179236

closes odoo/odoo#43883

Related: odoo/upgrade#922
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-17 13:01:57 +00:00
Pierre Paridans 0a1b2bf8d9 [IMP] sale: form view's spacing on small screens
This commit adds some margins before the "Terms & conditions" field for
better readability and visual balance (specifically when buttons appear
before terms field) on small screens.

Task ID: 2152164

closes odoo/odoo#41898

Related: odoo/enterprise#7274
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-03-18 10:13:59 +00:00
Dharmraj Jhala 88a0ddc5b6 [IMP] account: improve layout for 'tax-group-custom-field' widget
Before this commit, layout of the widget 'tax-group-custom-field' was
broken on small devices.

This commit improves the layout for the widget to make it consistent in
both small and large devices.

Task ID: 2152164
2020-03-18 10:13:59 +00:00
Simon Lejeune da818a9aae [FIX] stock_dropshipping: double sequence
Due to a typo, dropshipping sequences were created twice. We created a
"stock.dropshipping" sequence if no "stock.dropshippping" sequence was
found.

closes odoo/odoo#47908

X-original-commit: 021268734a5857f47cda5991fbd28abdd41f512a
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-18 11:53:56 +00:00
Jorge Pinna PuissantandXavier Morel 4ce7406b19 [FIX] fields: XLSX files mistaken as SVG files
Before this commit, when a user try to import data with a XLSX file, the
file was mistaken by an SVG file. This issue arises because a XLSX file
from import isn't encoded in base64, and for testing if the file is an
SVG file it will be decoded. base64.b64decode by default (when validate
is False), will remove all characters that are in the base-64 alphabet
from the input prior to decode. So in our case, when the non encoded
XSLX file is force decoded the results starts, unluckily,  with '<' and
it's mistaken by an XML/SVG file. Note that, the XSLX file is wrongly
tested because a XSLX file is just a ZIP file, and all the ZIP files
start with PK\x03\x04, and P is the first byte of a base64 encoded XML
file.

Now, only files that were previously encoded into base64 are decoded to
be tested. The validate = True parameter in base64.b64decode will raise
a binascii.Error if there are a non-base64-alphabet characters in the
input, this will allow us to know if the input was or wasn't base64
prior encoded. As base64.b64decode with validate = False, removed the
non-base64-alphabet characters this allows to decode input files
compatible with RFC 2045 (MIME). The files compatible with this standard
will have a newline character (b'\n') after every 76 bytes of the
output, and end with a newline. To keep backwards compatibility, we
remove the newlines and the carriage return from the input before the
decoding.

opw-2194468

closes #36081
closes #31849
closes #33543

closes odoo/odoo#47906

X-original-commit: 65d709c9ab386d646f682c494cfb21cb06ec8034
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-03-18 11:51:27 +00:00
qsm-odoo c66e0557df [FIX] website: use automatic color for transparent navbars
When enabling a transparent navbar on a specific page, the user can then
choose a bg color (class) to apply on the transparent navbar. That class
comes with an automatic text color... which was not correctly working
because BS4 overrides colors for nav-links.

Part of https://github.com/odoo/odoo/pull/45351
task-2151408

closes odoo/odoo#47896

X-original-commit: 2937358b63c23bd7e34da713ab4236fa340be0a9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-18 11:16:00 +00:00
Denis Ledoux ceb1acd6d4 [FIX] base: validate ir.ui.view xml on re-enabling
When passing a view
from `active` `False`
to `active` `True`,
its xml wasn't being checked, and it could be very well be invalid.

e.g.
Create a view inheriting from `base.view_partner_form`
`active` set to `False`
`arch` set to
```
<field name="foo" position="after">
    <field name="bar"/>
</field>
```

On creation, the `_check_xml` constraint is valid because the view is disabled.

Now, write `active` to `True`. Notice no constraint error is raised while the view is invalid.

This is particularly critical now that we automatically disable invalid custom views
during upgrades. When the user tries to re-enable the view which has been disabled to see
what was wrong, he doesn't get any error because of this.

closes odoo/odoo#47897

X-original-commit: fb2aeb29cd62e02ca5485e5b60d6b61ae4acc252
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-03-18 11:18:31 +00:00
Nicolas Lempereur 375179ed54 [FIX] web_editor: relative URL in background snippet
When the backround is set with the media modal, directly get the URL of
the IMG element (equivalent to `.getAttribute('src')`) instead of doing
`.src` which returns absolute URI.

This fix uses jQuery wrapper so it still works if called with object:

  $({src: 'test.jpg'}).attr('src') === 'test.jpg'

note: before 17237ff31 we already used `.attr('src')`.

opw-2215103
closes #47797

closes odoo/odoo#47872

X-original-commit: f04133d24b2271c0bc465f1628281b19d3656271
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-18 08:55:07 +00:00
wan 6a4076e4a7 [IMP] l10n_lu: clearer tax report line labels
part of Task 2213464

closes odoo/odoo#47887

X-original-commit: d9f90081ffb2938f82d1f4769d1abbd2c9fcb8b8
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-18 10:43:04 +00:00
Lavish Chhatwani 9a9edeaf35 [FIX] website_slides: avoid trying to browse categories in frontend player
Before this commit when you browse a course's contents,the category is
displayed as a blank page with a pdf icon rather than going directly to the
next content.

This commit fixes that by skipping the category. User is redirected to the
next available slide.

Task 2201175
Closes #46824

closes odoo/odoo#47886

X-original-commit: 4625c017cfda9ad800124452448252a11a8ac9bb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-18 10:23:31 +00:00
Ravi Gohil 895ccbec61 [FIX] l10n_fr: broken module installation
culprit commit: 4837a8eeef9bad014bc62f2704868e2464729f4b

Fixed missing 'tag_ids' values for account templates when forward
ported above commit from v11.0 to current version.

closes odoo/odoo#47883

X-original-commit: 67362692c7defe288b7f591f6f9cb7cd732e18fc
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-18 10:12:26 +00:00
Christophe Monniez 5533490b46 [FIX] ir_model: avoid records duplicates in dichotomy
When uninstalling a module, all related ir.model.data records are
unlinked, if the unlink fails, a dichotomy is performed until all
records are unlinked.

It happens that a record appears in both part of the dichotomy. In that
case, the record is deleted in the first part. When second part records
are unlinked, a crash occurs because the record cannot be found anymore.

With this commit, sets are used instead of lists to store the records
that need to be removed, avoiding duplicates in dichotomy.

closes odoo/odoo#46323

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-02 16:09:12 +00:00
Adrian TorresandRaphael Collet 0453566a76 [ADD] tests: add a script to test module uninstallation
With this commit, a new script "tests-uninstalls.py" is added in order to
test module uninstallation.

This script is a kind of standalone tool. It uses odoo as a library but
the odoo server is not started at all.

In its standard invocation, it tries an install/uninstall/reinstall
cycle for each all module found in the specified database.

By specifying '-U', it only tries to uninstall the comma separated list
of modules following the argument.

Be aware that this tool, will alter the database against which it was
invoked.

Co-authored-by: Raphael Collet <rco@odoo.com>
2020-03-02 16:07:06 +00:00
alt-odoo 04f3041a5e [FIX] l10n_fr: adapt French COA data to include subaccounts of 608
Le compte 608. « Frais accessoires d’achat …» peut être ventilé :

Selon les achats concernés comme les matières premières, les marchandises et les différents approvisionnements :

Dans ce cas, sont recommandées les subdivisions suivantes :

6081 Frais accessoires sur achats de matières premières (et fournitures)
6082 Frais accessoires sur achats d'autres approvisionnements stockés
6084 Frais accessoires sur achats d'études et prestations de services
6085 Frais accessoires sur achats de matériel, équipements et travaux
6086 Frais accessoires sur achats d'approvisionnements non stockés
6087 Frais accessoires sur achats de marchandises

Référence: http://public.iutenligne.net/comptabilite/comptabilite-financiere/antraigue_januario/CTA-FIN-14/Chapitre-01/Sous-section-1-1-2.html

opw:2186347

closes odoo/odoo#47844

X-original-commit: 4095c25262dd3abe007435dd06bb48c829677e4d
Related: odoo/enterprise#9322
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-03-17 16:54:47 +00:00
Samuel Degueldre 7ae7f47cd7 [FIX] web_editor: stop base 64 being saved in the DOM when recropping
When saving after cropping an attachment, a new cropped attachment is
created, and the temporary base64 URL is replaced by the url of the new
attachment. However, when cropping an image for a second time, the
original image is recropped, and the cropped image attachment that was
created previously is overriden with the new data.

Previously, the step that overrides the temporary base64 url with the
url of the croppped attachment was not present when overriding a
previously cropped attachment, meaning it would be saved as is in the
DOM, and the overriden attachment would no longer have any links
pointing to it. This commit fixes that by overriding the temporary
base64 url both when cropping for the first time, but also for
subsequent re-crops of the same image.

closes odoo/odoo#47836

X-original-commit: 3b23f137a2b519b88087452fa4c33a9f97ccdf61
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-17 15:17:30 +00:00
yhu-odoo 915abb533c [FIX] l10n_cn: don't check when no fapiao
Don't check the fapiao number format when there is not fapiao number :)

Related to #45743 and task 2180269

closes odoo/odoo#47835

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-17 14:36:46 +00:00
Paul Morelle c542af7aee [FIX] account: fix reconciliation buttons layout
Since ae6545ccd5 in 11.0, reconciliation
model buttons were wrapping and were scrolling vertically when more than
three lines were shown.

Since the change to bootstrap 4 in 12.0, however, the reconciliation
model buttons were not wrapping any more, and were scrolling
horizontally.

This commit restores the previous behavior, which can display more
buttons before any scrolling is necessary.

closes odoo/odoo#47828

X-original-commit: 0c4195f2c2eec7589ed79a21fbbe089a75c6209f
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-03-17 14:35:28 +00:00
Romain Derie 96d3fa4e01 [IMP] base, website: add ir.ui.view action to compare arch (wizard)
This commit adds the possibility to compare a view arch to another one.
The result will be shown in a diff viewer (github like).

This is following what was done at #32009

task-2190072

closes odoo/odoo#44646

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-17 15:58:45 +00:00
oco-odoo 0fc9adbe0b [IMP] account: tax tags: add a constraint ensuring a country is always set on tax tags
The use of such tags was not supported if no country was set on them (we need one to properly filter what to display in tax configuration). We just make it explicit by adding this constraint.

closes odoo/odoo#47813

X-original-commit: f76c2d92c58b2055bc906b32d47f192c615a46ed
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-17 13:19:37 +00:00
Nicolas Martinelli b463c956b4 [FIX] purchase: invoice status
1. Create a product A with 'Control Policy' set to 'On received
   quantities'
2. Create a PO for 10 units
   => status is `no`
3. Validate the PO
   => status is `no`
4. Receive 5 units
   => status is `to invoice`
5. Invoice 5 units
   => status is `invoiced`
6. Receive the remaining quantity
   => status is `to invoice`
7. Invoice the remaining quantity
   => status is `invoiced`

There is an inconsistency between steps 3 and 5: there is pending
material to receive, but the status is different.

This is due to the fact the `order.invoice_ids` is checked, while it
shouldn't affect the computation of the status.

The status should be `no` in steps 3 and 5.

opw-2206447

closes odoo/odoo#47802

X-original-commit: 15330712d2ea3c16c57e01c236c783a6febd1376
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-17 11:48:35 +00:00
Vishnu Thuletiya 21f7866367 [IMP] stock: add empty group in production lot form view
Currently stock.production.lot form view doesn't propose a second
column by default and the "column" component won't work from studio.
(It works well when no column exist, but not when one already exists)

So added an empty group for consistent studio customization in the
stock.production.lot form view.

closes odoo/odoo#47794

Taskid: 2043928
Closes: #47794
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-17 12:00:58 +00:00
Okan SUMER (osu) 48683ff315 [IMP] website_blog: clean blog.post code
This commit modify code to adjust or add small features :

- Add '(copy)' at the end of a duplicate blog.post
- Create a field that count the number of blog.post
  and adding it in the blog.blog tree view
- Add author_id column in blog.blog tree view
- Disable the modification of the number of comments and
  the is_published red label in the frontend
- Create a link anchor to the comments section on the number
  of comments (In blog.post frontend view)
- Redirect to the comment section of the current blog.post
  if logging in from the button in this same area

Part of https://github.com/odoo/odoo/pull/46242

task-2201675

closes odoo/odoo#46242

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-17 14:04:08 +00:00
Okan SUMER (osu) 9dca556b78 [IMP] website_blog: adjust demo data
This commit add and adjust some data from the demo data

- Modify the authors of blog.post
- Change the field website_published to is_published
  in blog.post to correct the date calculation
- Add comments to blog.post

Part of https://github.com/odoo/odoo/pull/46242

task-2201675
2020-03-17 14:03:08 +00:00
Mohammed Shekha 0c67b249a6 [IMP] sms: do not wrap phone widget element in div
if we wrap phone widget element inside div then phone link will be clickable
inside studio mode, as soon as user tries to click on phone text phone call
will be trigerred, which is wrong in studio edition mode.

if studio edition mode is enable then clicking on phone text should not
trigger call, we already handle click in readonly mode on widget's
in form_editor.js -> _processField method but in phone widget sms module
changes  of phone widget and wrap it into div which makes phone text
and sms icon clickable and trigger phone call, to avoid this case remove
wrapping of widget inside div.

task-2118509

closes odoo/odoo#42685

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-03-13 11:30:33 +00:00