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
Due to a typo, dropshipping sequences were created twice. We created a
"stock.dropshipping" sequence if no "stock.dropshippping" sequence was
found.
closesodoo/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>
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#36081closes#31849closes#33543closesodoo/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>
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
closesodoo/odoo#47896
X-original-commit: 2937358b63c23bd7e34da713ab4236fa340be0a9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/odoo#47897
X-original-commit: fb2aeb29cd62e02ca5485e5b60d6b61ae4acc252
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
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#47797closesodoo/odoo#47872
X-original-commit: f04133d24b2271c0bc465f1628281b19d3656271
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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#46824closesodoo/odoo#47886
X-original-commit: 4625c017cfda9ad800124452448252a11a8ac9bb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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.
closesodoo/odoo#46323
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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>
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
closesodoo/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>
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.
closesodoo/odoo#47836
X-original-commit: 3b23f137a2b519b88087452fa4c33a9f97ccdf61
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Don't check the fapiao number format when there is not fapiao number :)
Related to #45743 and task 2180269
closesodoo/odoo#47835
Signed-off-by: Josse Colpaert <jco@openerp.com>
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.
closesodoo/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>
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
closesodoo/odoo#44646
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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.
closesodoo/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>
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
closesodoo/odoo#47802
X-original-commit: 15330712d2ea3c16c57e01c236c783a6febd1376
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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>
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
closesodoo/odoo#46242
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
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
closesodoo/odoo#42685
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Adds Python tests and javascripts tours on livechat (website and visitor
integration). Because breaking livechat every two days in rush periods
(or even not) is getting quite annoying.
Those tests are testing :
- The client side flow (open livechat, send messages,
send rating and close the livechat session)
- The channel and message author naming, visitor page view history
- Chat request flow (complete chat request flow, open empty operator's
chat request and cancel due to visitor's new chat session)
Task ID : 2079087
PR #40052
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The possibility to create invoices from project tasks was being
introduced in industry_fsm_sale. This moves the server action to
sale_project.
Task-2191253
closesodoo/odoo#45650
Related: odoo/enterprise#8530
Related: odoo/upgrade#808
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce the bug:
- Let's consider a posted customer invoice I for partner P
- Let's consider that the salesperson S is assigned to I
- Create a credit note CN from I
Bug:
The salesperson assigned for CN was the current user U instead of S
opw:2213607
closesodoo/odoo#47768
X-original-commit: 1968ef19f72a2d3fecc4093527c6ba15262dd295
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Steps to reproduce the bug:
- Go to the chart of accounts
- Create an account A with user_type_id = "Bank and Cash"
- Go to form view of A and reconcilie button is hidden
- Go list view
Bug:
The reconcile toggle button was visible.
opw:2216244
closesodoo/odoo#47741
X-original-commit: 50c794e0c9be9ade7dd47bb9200351d8cfdc97b2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Create a Promotion Program with
'Applicability' set to 'Apply On Next Order'
'Promo Code Usage' set to 'Use a code', set a code (not required,
only for easiness)
- Create a SO, use the code and validate
- In the Promotion Programs, open the coupon list
The Expiration Date is set to tomorrow.
The Expiration Date is not useful in this case, and it is computed only
because the default value of `validity_duration` is 1. However, the user
is not able to change it since `maximum_use_number` is used for
programs instead.
We set a default value to zero to avoid any confusing computation.
opw-2210794
closesodoo/odoo#47779
X-original-commit: 44e71f9192d8711cbaeac0088db55c3ff26813a1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Followup on c058562d73
Before this commit, Domain for `purchase_ok` on the field `product_id` was applied on the field level which was Replaced by multi-company domain on views.
With this commit, we combine both domains to Display only `Can be Purchased` products.
closesodoo/odoo#47778
X-original-commit: 842b8a383b7868a89cbd3d81b0065cce37606db4
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The purpose of this task is to allow the user to create pages which describe
the next survey questions. He can now edit the description in a form when he
clicks on the info icon when he creates or edits a page/section.
Page will be displayed on the frontend in all cases. This allows notably
to have pages with some text / comment for presenters when doing live
action surveys.
Task 2182886
Pr #44271
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit,
- In menu 'all timesheet', the group by was project > employee and
in menu reporting 'timesheet by Project' group by was project > employee
So after this commit, change the default groupby on those menu as:
- In 'all timesheet' menu group by: Employee > Project
- In 'reporting by Project' menu group by: Project only
closesodoo/odoo#47087
Taskid: 2194073
Related: https://github.com/odoo/enterprise/pull/8654
Related: odoo/enterprise#9076
Closes: #46017
X-original-commit: 523f0b2c1cbeb5e7b80412a1c4e6a440f41fea41
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- In inventory app, create an attribute that is dynamic
- Create a product with a variant with the dynamic attribute
- Create a bom for the product with some specific component for that variant
- Open structure and cost
A crash occurs.
In this case, the object is a `product.template`, so a condition
product-specific shouldn't be checked.
The template is set at:
https://github.com/odoo/odoo/blob/3588487ab4ef867f7fb981a395deaf298eb4a4e4/addons/mrp/report/mrp_report_bom_structure.py#L107
opw-2198976
closesodoo/odoo#47769
X-original-commit: 3c476dee5d3a0cc0fde0f9c6620507a07929e4fc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Previously, when trying to compute the optimized width for an image,
if the mediaWidth option was unspecified, _computeOptimizedWidth would
return NaN, and in all the places where it was specified, it was
specified as 1920 meaning it was essentially useless.
This commit makes the media's clientWidth the default value for
mediaWidth, meaning that if options.mediaWidth is unspecified, the size
of the element in the page (if one exists) is used. This allows the
suggested width to be actually useful, instead of always suggesting
1920. Specifying a mediaWidth in the options overrides this value.
task-2215913
closesodoo/odoo#47767
X-original-commit: 644572819ab9a1525af6077dd20c63957eb9271c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the query to fetch records with/without relations would be
done in a separate query which results would be then passed to the main query.
This commit adds this query as a subquery of the main query to do it in the
same SQL query instead of separately.
task-2211013
closesodoo/odoo#47729
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Purpose of this task is to clean up the orders interface with keeping
just the needed action buttons.
So in this commit we hide cancel button if the order is not saved yet.
it will also hide the cancel button for the rental order.
closes odoo/odoo#47579
Taskid: 2080191
Closes: #47579
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the context sent by an action performed by the action menu
could hold an 'undefined' select_all key, which would cause the context evaluation
to crash.
Now, the select_all key is defaulted to 'false' and does not crash in actions that
do not provide it.
closesodoo/odoo#47745
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In order to have an easier and better time showcasing the functionalities of
event, demo data had to be improved.
LINKS
closes odoo/odoo#45372
Taskid: 2170834
Pr: #45372
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Even if you don't manage your payroll using Odoo, it could interesting to
categorize your contract (CP200, ...), in case you manage several kind
of workers or employees in your company.
TaskID: 2148537
Create an Email Template without email_from
Create Server Action with Send Email
Establish email template as one created
User will be blocked because the template does not have a valid
'email_from'. This does not seems to be useful since the send action is
run via contextual menu, so the message by default will have the address
of the user performing the action.
opw-2213526
closesodoo/odoo#47703
X-original-commit: e083278fe18d491c487e6af4c9ac923acd36c74a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Part of task 2213464
PCMN was using wronc account types
Some tax section lines were not computed
closesodoo/odoo#47708
X-original-commit: 4e64a6c7e857f449695b469bfb5607bdbbc55abc
Related: odoo/enterprise#9271
Signed-off-by: Josse Colpaert <jco@openerp.com>
Performances from a general point of view can be difficult to track.
This commit proposes to improve logs in two ways:
The current logs only use the sql_counter, wich will only be updated
when a cursor is closed. In a test-enable install, this counter
is actually the queries of the tests wince the install cursor is
open untill the end. The first fix is to use bot sql_counter and
sql_log_count to have total queries untill now on closed cursor,
but also the current number of queries of the current cursor.
This means that the new log format will be
{nb} modules loaded in {time}, {loading_querie} (+{test_cr_queries}) queries
instead of
{nb} modules loaded in {time}, {tests_cr__queries}queries
Nothe that in the current version, {nb} is actually the total number of
loaded modules until now.
This commit also add an equivalent end log by module and change the
loglevel of module start on install (mainly usefull if an error occurs
before anything else is logged hidding the module causing this error.)
A cleaner runbot logger is also added, in order to be abble to call
_logger.runbot( instead of _logger.log(25. This will clarify the purpose
of such a log level.
closesodoo/odoo#47283
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
In JavaScript, the following computation introduces numerical errors:
```
Math.pow(10, -4) = 0.00009999999999999999
Math.pow(10, -5) = 0.000009999999999999999
```
In the context of `round_decimals`, such errors propagate to
`round_precision`, ultimately leading to inconsistencies between Python
and JS (see #47300 for detailed use case).
Instead of computing `Math.pow(10, decimals)`, we parse the scientific
notation to prevent such inaccuracies.
We also introduce tests in line with the Python tests.
opw-2205092
closesodoo/odoo#47694
X-original-commit: cb471897bfa08d1fee6a9f49e90d9c120e1733fc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The default currency of Guatemela is GTQ.
opw-2201797
closesodoo/odoo#47693
X-original-commit: c253dc883ad84359e6db23150ab794368c07def4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Combining a state and attrs does not work
Apply all in the same domain
closesodoo/odoo#47676
X-original-commit: 3588487ab4ef867f7fb981a395deaf298eb4a4e4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, the monetary widget was not applied to the `amount` field since there was no `currency_id` field on this view.
In this commit, We add `currency_id` field to make the monetary widget work.
closesodoo/odoo#47308
X-original-commit: 4205344cdc518e923a1f3be8cfca4c3ed2bfc3ef
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>