Currently, When we create expense report from expense it will
directly create a expense report record so discard button on
top is misleading.
So in this commit, when creating the expense report from the expense
it will not create an record but set the default value in editable
form view with auto computed name based on expense.
Also create report action coming to the two places
1) in top action menu
2) on tree header
So in this commit, removed 'create report' menu from top
action bar.
Added the depends on can_reset and can_approve to compute
the value for displaying the button when record is not saved
from the 'create Expense report' button and default in submit state.
also fix the attachment_number field because expense.id is
NewId_X while passing in default_get of expense_line_ids so count was
0 without saving the expense sheet.
closesodoo/odoo#65104
Taskid: 2359834
Related: odoo/upgrade#1875
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
What are the steps to reproduce your issue ?
1. Go to Contacts > Configuration > Localization > Countries > Select a country
2. Edit the 'Layout in reports' (enable debug mode) and add an invalid field
3. Create a Quotation and search for a customer from the country you edited.
What is currently happening ?
Traceback is raised and you can't select the customer anymore
Why is this happening ?
Because the key is not defined.
How to fix the bug ?
Handle KeyError to detect if the user put an undefined key
Handle ValueError to detect if the user put an invalid format key
opw-2447078
closesodoo/odoo#69014
X-original-commit: 675feb254ed3448571818a77c920012cbd066c8b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
* If `where_clause` is empty, then there will be an error. This commit fixes that.
closesodoo/odoo#69100
X-original-commit: f0a1bb3692e17334850fed4f22444f47992adb78
Signed-off-by: William André (wan) <wan@odoo.com>
If the user type his website URL as suggested by the helper, and he redirects
his `http` to `https` (nginx, cloudflare..), then his canonical url won't ever
be reachable.
Most critical issue will be that we won't display the `alternate/hreflang` tag,
which basically tells the search engines what and where is our translated
content.
opw-2486918
closesodoo/odoo#69093
X-original-commit: 15bf30b7b5312a943772ece20303e215b1ed6f6c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
The website scroll effects using the `AnimationEffect` Odoo API were not
working anymore if custom code enforces the html element as the
scrolling element. Indeed in that case the scroll event handlers were
now attached to the html element itself while it needs to be the window
in that case.
This may be something to fix at the source (the `getScrollingElement`
method). This will be checked later.
closesodoo/odoo#69087
X-original-commit: 21650ce342d0329c5385acf1181be154abbec550
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Have 2 companies, one in FR (with l10n_fr), one in IT (with l10n_it_edi)
From the French company create an invoice for a french customer.
Confirm.
The message ' E-Invoice check failed. You can modify the
invoice, and resend it.' related to italian e-invoicing will appear
opw-2481035
closesodoo/odoo#69050
X-original-commit: d5075308131f82020702c6650a1869ffd93fb85e
Signed-off-by: Josse Colpaert <jco@openerp.com>
Steps to follow to reproduce the bug:
- Create an Indonesian company
- Go to Invoicing settings / in “Fiscal Localization” / install Indonesian-Accounting “ l10n_id”
- Go to Invoicing / Vendors / bills
- Create a new bill / add a vendor / go to “other info” / add a valid Indonesian Tax Number, for example : “0112345678912345”
- An error is triggered
Problem:
In the “_onchange_l10n_id_tax_number” method, we try to access “record.type”, but in v14 the field "type" was replaced by "move_type” in the "account.move" model.
opw-2492530
closesodoo/odoo#69064
X-original-commit: 7cac0104625ea2bedf02a6c47801ccdb930ab939
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
When searching on attachment a (res_field, =, False) domain is
automatically added in the domain in the _search override.
The force_storage method was skipping the attachments linked to a
field and was also applying on fields of type url
closesodoo/odoo#58086
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Without this commit, a database with only one website would not see the domain
field in the res settings.
But the domain field is useful to set even if there is only one website.
For instance, if no domain is specified, the web.base.url ICP will be used
instead to generate links, but it might be the wrong url as it is the last
domain used to login as the admin (unless web.base.url.freeze is set).
Also, one might want to unset the `localhost` domain that was set by default
in xml data (now removed with 1f0edacdf)
closesodoo/odoo#69038
X-original-commit: 0650862c7adcbe4113e071778a66053b88e004ef
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
If a partner has a not handled responsibility type return an empty list
as possibles document types instead of raising an error.
closesodoo/odoo#69010
X-original-commit: abcba544043b08de4cffcf5affd12b08afec188f
Signed-off-by: Josse Colpaert <jco@openerp.com>
- Add a new responsibility type "IVA No Alcanzado"
- Update the partner "AFIP" with that responsibility
X-original-commit: e3e20fdccc2ad7bf0015d4c0a67c7ab803a97bd8
Focus is sometimes called on the Wysiwyg class in Note.
When the user use TAB to select the next field.
Implementation was missing.
closesodoo/odoo#69033
X-original-commit: 720c1f38a17ef54cf30e0a52bab5bceed70c2144
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Currently, when we install Employee App, the Administrator work address
is linked to a new res.partner (Administrator).
So after this commit, Administrator work address will be linked to
the res.partner of company when Employee App is installed.
closesodoo/odoo#67910
Taskid: 2479958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
With the new OS RaspiOS the firmware for the wifi card are unstable.
We need to keep a specific version of firmware-brcm80211 to keep
a stable and usable wifi connection.
So we fallback on a previous version of Buster and hold the
version of the package firmware-brcm80211 before the upgrade when
we build the box.
closesodoo/odoo#69022
Id: 2499855
X-original-commit: 04c58aa229781ad165492765414483ae8e8d6693
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Purpose
-----------
Currently, we have reports that depict the status of a
project at a certain point in time, but we don't have any reports
representing the actual progress of the project in time.
## Details
### Burndown Chart
A burndown chart is added in the reporting menu, this chart would help users see
the evolution of the project and determine whether it is on the
right track or not.
### Stacked in line chart
Currently, we can stacked in bar chart but not in line and pie charts. Here, the stacked will be also available in the line chart for the burndown chart.
Some unit tests in JS are added to keep the stacked in line chart of the burndown chart.
### Disable the pie chart in this reporting
This chart is not useful for this reporting, thus, the button has been hidden.
### Move constants and functions in own JS file
In web module, the GraphRenderer file contains some constants and functions used in the renderer of the graph view, these constants and functions are moved in new file called graph_utils.js to easily export these.
task-2458017
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#68343
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Show full path to not found addons folder to ease debugging.
Before:
error: option --addons-path: no such directory: '../non-existing'
After:
error: option --addons-path: no such directory: '/home/user/Odoo/non-existing'
This message is local to developer and never displayed to the enduser
closesodoo/odoo#68959
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
1. Have a [DEMO] product in stock with an owner
2. Make a PoS order with [DEMO]
The system will use the stock without owner.
opw-2480341
closesodoo/odoo#68951
X-original-commit: eaa9c6cc9481fb97d8c44aa057fc97accfc4d649
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Doing domains like [('something_ids', 'in', 4)] crashed the emulator because it was trying to check something was 'in 4', instead of reversing the check (as real form views do).
closesodoo/odoo#68988
X-original-commit: eb14583442f2729182ffb8ec7b069e2505df3577
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This fix was not forward ported when introduced: #50745closesodoo/odoo#68980
X-original-commit: 3e5130d90127d9634c48e5301e96ddcad9b66e17
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, burndown chart displayed all changes of stage for
all active tasks in all projects. The problem is when the database
contains many projects and tasks over many years, the user can have a
timeout page rather than the burndown chart view, because we take all
active tasks in all projects, if the user doesn't archive his projects
and tasks, the data retrieved for the burndown chart is too huge to
quickly have a visual result.
This commit filters the burndown chart by the active project to retrieve
only the active tasks in a project and not all projects in the database.
task-2458017
closes#68343
Before this commit, we add various buttons in the bottom of each card with a
certain condition, the problem is the lack of place to display more and
more information in each project kanban card.
This commit reviews the dropdown menus in each project kanban card.
Two sections is added one for another 'Views' to redirect to documents,
timesheets, sales order and planning, for instance. And the last section
for 'Reporting' like burndown chart.
task-2458017
closes#68343
Before this commit, the burndown chart button is displayed in the
reporting menu, the problem is when the database contains many projects
and many tasks over many years, the user has a timeout page rather than
view the burndown chart, because we take all active tasks in all
projects, if the user doesn't archive his projects and tasks, the data
retrieved for the burndown chart is too huge to have a visual result.
This commit moves the burndown chart button in the project form view, in
this position, the data will be for only one project and not all active
projects.
task-2458017
closes#68343
Before this commit, the code removed has a `t-if="1 == 0"`, it means
the content is never visible in the kanban view.
This commit removes this deprecated code.
task-2458017
closes#68343
This commit adds some unit tests in JS to check to check the line chart
for the burndown chart. If this view can be stacked as bar chart and the
stacked button is hidden only when the mode is pie chart in the graph
view.
task-2458017
Before this commit, the stacked is not available in the line chart but
only in the bar chart.
This commit adds the "Stacked" button in the line chart and add the
possibility to stack in this line graph.
Additional features:
- add same color for the background color when stacked
when we want to stacked in the line chart, the
background color is grey or black by default and we play with the
opacity of this color.
This commit takes the borderColor of each dataset and gives the same
color with opacity set to 0.4 for the background color when we want to
stack the line chart.
- hide the pie chart button
task-2458017
Before this commit, we must to copy paste the functions useful for the
GraphRenderer when we override this model.
This commit moves the functions and the global variables in a new module
called graph_utils.
task-2458017
Before this commit we have reports that depict the status of a
project at a certain point in time, but we don't have any reports
representing the actual progress of the project in time.
This commit adds a burndown chart, this chart would help users see
the evolution of the project and determine whether it is on the
right track or not.
task-2458017
The custom code for project.project kanban view prevented the kanban to
works in selectionMode (eg. kanban view to select a many2one record in
mobile).
opw-2490912
closesodoo/odoo#68918
X-original-commit: f03a690f09b07755cf4172524cf99f7ded5e7681
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, the class col-auto was missing from the element
representing the incoterm code on sales orders' reports.
When more than four fields were shown at once in the containing table,
the columns' width was no longer equal.
closesodoo/odoo#68694
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
The website is now referenced to Odoo's website, with the most updated documentation.
closesodoo/odoo#68936
X-original-commit: ad692a438acbe4054c91626a0088220611bd8f2a
Signed-off-by: Josse Colpaert <jco@openerp.com>
When marking an operation as done, the quantity produced may be zero.
Therefore, the duration computation will not work.
To reproduce the error:
1. In Settings, enable "Work Orders"
2. Create two products P_prod and P_compo
- P_compo is consumable and its cost is 100
3. In Manufacturing, edit/create a Work Center WC
- Cost per hour must be 60
4. Create a Bill of Materials BM
- Product: P_prod
- Component: P_compo
- Operation:
- Work Center: WC
- Duration Computation: Compute based on tracked time
- Based on last 3 work orders
- Default Duration: 10:00
5. In Structure & Cost, notice that BoM Cost is 110
- 100 (P_compo's cost)
- 10 (OP's cost based on default time)
6. Do the following 3 times:
- Create a MO with P_prod using BM, Confirm
- In Work Orders, click on Start, then Done
- Edit the Real Duration of OP: 20:00
- Mark as Done
7. Back to BM, open Structure & Cost again
Error: BoM Cost is 110, this is incorrect: OP's cost is still 10, it
should be 20 (from step 6).
The problem is the quantity produced for each operation. Since this
quantity is never defined, it remains at 0. Therefore, when computing
the duration, since there is no quantity, the module keeps the default
value.
This fix changes the behavior. When the user marks the operation as done
from the form view, the module defines the quantity produced using the
quantity in production (this quantity may have been defined by the user
through the tablet mode). If this value is also 0, the module will use
the quantity expected by the MO.
`('qty_produced', '>', 0)` is added to avoid lines with zero quantity
produced, which was possible before this fix. Otherwise, the duration
calculation will give wrong values.
OPW-2453996
closesodoo/odoo#68917
X-original-commit: 93be6c6cfcfb3c4e52790569632dbdcdb1a3ae54
Related: odoo/enterprise#17540
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Currently, when exporting move lines via for example the partner ledger,
we are not displaying the currency in any way in the xlsx.
For some company, this can be limiting since they may want to do
post-treatment inside the file after export, which can require such
information.
This change will add the 'always_set_currency_id' field as optional
into the list view of the amls, allowing to keep the information about
the currency when exporting if needed.
task id #2381355closesodoo/odoo#68911
X-original-commit: 62bad5e50aa1fe579ecc07242a22ec6ab6031e71
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
Rationale:
The majority of cases where an ir.asset is manually declared
outside of manifest files is to specifically add a single asset file.
This means developers are specifying a single asset *path*, and not a
glob expression. In this context, it seems better to name the filepath
field `path`, and document that it can be specified with a glob
expression when (seldom) needed, rather than making the exception appear
to be the norm - possibly puzzling many developers (What's a glob and
why do I need one?)
The doc is updated as well, and some spell-checking and wording
improvements were done too.
This required some adaptations to the existing `ir.asset` declarations:
- odoo/enterprise#17465
- odoo/design-themes#459closesodoo/odoo#68695
Related: odoo/upgrade#2348
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
*: website_sale_product_configurator
The goal of this commit is to fix the tour : "shop_buy_product"
by adding the "goToCart" step to work with the new "add to cart"
scenarios (adding products in the same page is default behaviour).
closesodoo/odoo#68889
X-original-commit: ccc1584cd5ee9156e96e373997765b94831a828d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
* New method _get_vat_validation_fields to set the fields used
in vat validation.
* New method _get_country_related_render_values that returns all
the fields related to the country to be rendered in the address form.
These methods are necessary to allow the different localizations
(see l10n_ar_website_sale) to adapt the ecommerce to their own needs.
closesodoo/odoo#68851
X-original-commit: 3b01c249a8d2b9673992942c2c5ea50ef0488708
Signed-off-by: Josse Colpaert <jco@openerp.com>
New module that adds argentinean requirements to the website ecommerce
* Add fields to the checkout form
* Identification type field
* AFIP responsibility type field
* Add logic to validate the new fields
* Take into account the identification type when validating the VAT in the checkout form
* Add validation of the combination between identification type and AFIP responsibility fields
* Change label name for the vat field, to show "Number" instead of "VAT number".
* Add demo data to display an argentinean website and show products with taxes
* Add module translations
X-original-commit: e23b9bfd47b2a8aee4468fdd3f35aced81761eb3
Currently, the company_id of an account move is related to its journal.
This means that if you empty the journal field, the company_id is also
emptied.
This is then causing a traceback when adding a new line, for example.
This change will transform the related company_id in a computed field,
making sure to not lose the company_id if the journal_id is emptied.
task id #2392004closesodoo/odoo#68886
X-original-commit: c3c6ec69a0c50daf0b33df62144b6cd2f254a4f5
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
Without this, the website selector was not working
closesodoo/odoo#68877
X-original-commit: 967132be52d259eaa89b7c0d32b8e4a116d4ad9e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this, when making a partner without any country_id, any VAT could be set to it, which was inconsistent with the module's purpose.
closesodoo/odoo#68815
X-original-commit: 72606f14d0c1d86d7a205fd29aec8d66d3e98678
Related: odoo/enterprise#17505
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
The resequence wizard should consider that the sequence is shared for
invoices, journal entries and receipts; only refunds have a separate
sequence.
You could have journal entries in the purchase journal for expense
reports for instance. In that case, we want to be able to resequence all
of it at once.
closesodoo/odoo#68871
X-original-commit: 365da2a0aca1503133433f9dc66b6866e7867974
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
*: web_editor
It prevents user writing in the image preview of products.
Also, the product image view now fit its container so that the user can
click wherever in the frame to change the picture.
Part of https://github.com/odoo/odoo/pull/68823
task-2446852
closesodoo/odoo#68850
X-original-commit: e4f06666307e79b9a5b26357a1545a56e6bd40b2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>