Sales flow require a pricelist to work, but the field was
set non required by mistake.
Since this is a stable version, we can only reduce potential problems
through views & create modifications.
The field will be made required again in next version(s).
closesodoo/odoo#88387
X-original-commit: af9f60d6981fb8b010dc60e93561d7af88372f47
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This is a followup of #86567, where we change the computation of
display_name to match the values of name_get(). Forcing its value to
False instead of the empty string causes many regressions in frontend
applications like website_blog.
closesodoo/odoo#88438
X-original-commit: d467881f66b11021005005584854f30059971b6c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The address in a SO report with RTL languages are cutoff, they
overflow the layout of the PDF which makes the address unreadable.
To reproduce the issue:
1. On runbot v15 > make a SO with the recipient in Arabic/Persian/Hebrew language (any language that is RTL)
2. Specify a different delivery/invoicing address than the recipient
3. Print the PDF
Result: Part of the delivery address is cut off
Solution: As for now, two CSS stylesheets are used in the HTML before transforming it to a PDF: *bootstrap.css* & *web.report_assets_common.min.css* (where the latter is mapped in RTL style with RTLCSS). Note that the *web.report_assets_common.min.css* import in itself the bootstrap style BEFORE the RTL mapping. Thus, they both define the `offset-1` class which is used by our problematic component in the HTML/PDF (a `margin-left` for the *bootstrap.css* and a `margin-right` for the *web.report_assets_common.min.css*). Consequently, these 2 margins makes the bootstrap `row` overflow. There are two different margin because the `margin-left` from *bootstrap.css* was translated into `margin-right` in the other CSS when doing the RTL mapping. A quick fix would be to override this undesired `margin-left` and make it null into the sale_report specific CSS style. While it would work, it does not resolve the underlying issue. In normal circumstances, the *bootstrap.css* should not be used into the report. It is in fact included because there is an error into the manifest of the web module (see permalink here-under). The issue comes from a file that was moved during the migration to the OWL framework (see commit 29731b4).
In the end, both fix will be applied on all versions except master. We keep the quickfix in running versions to avoid requiring an update by the client but the quickfix will not be pushed to master.
https://github.com/odoo/odoo/blob/95bcc8472c3f3ddc8a4c7c1ab4a97ddbd471dba0/odoo/addons/base/models/assetsbundle.py#L166
opw-2767445
closesodoo/odoo#88437
X-original-commit: b99df11f5ac2d4ca6e44d0f4963a600d3aef5a55
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
By updating all the fields/keys retrieved by _compute_quantities_dict,
rather than just a group of hardcoded ones, it makes it possible to
efficiently extend the model to add extra fields to compute by it.
closesodoo/odoo#88049
Signed-off-by: Arnold Moyaux <arm@odoo.com>
It is now possible to render multiple popups and most of them
are draggable. However, when the popup is hidden, the Draggable
component fails at onMounted because the limitArea (derived from
the offsetParent) is null. To fix, we first check the limitArea
before proceeding to the rest of onMounted procedure.
This fixes the issue when the pos ui is suddenly disconnected
from the server, and the OfflineErrorPopup blocks the ui and
the user can't get rid of it.
closesodoo/odoo#88373
Signed-off-by: Masereel Pierre <pim@odoo.com>
Observed Behaviour
When loading limited number of products in POS, we have the "database search"
functionnality allowing use to search in non-loaded product. Anyway, using this
method will make all products found in the search available in POS, despite
having set it to "False" on the product page.
Desired Behaviour
This search method should only search on the already checked "available in POS"
products and shouldn't in any case write in the models.
Fix Description
A filter on "available_in_pos" property has been added to the search, and,
because we now only search on already availaible products, rewriting on this
fields isn't necessary. We then decided to add an optional parameters to the
_addProducts method, set to true by default, which allow us to set (or not)
the products as 'available in POS'.
Related Issues/PR
-opw-2766095
closesodoo/odoo#88386
X-original-commit: e19dca22c5740262449ca061d1681eb8555036f0
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
The account used in the Repartition for Credit Notes is wrong for taxes
`IVA(8%) COMPRAS`, `IVA(16%) COMPRAS`, `IVA(8%) VENTAS`, `RETENCION IVA
ARRENDAMIENTO 10.67%`, `RETENCION IVA HONORARIOS 10.67%` and `IVA(0%)
COMPRAS`
Steps to reproduce:
1. Install Accounting app and l10n_mx module
2. Go to Accounting > Configuration > Invoicing > Taxes
3. Open any one of the taxes mentioned above
4. The account in Repartition for Invoices should be the same as the
account in Repartition for Credit Notes
Solution:
Change the default account used in Repartion for Credit Notes
opw-2806228
closesodoo/odoo#88359
X-original-commit: e8dbd07f160dee59117b855ff54d6fb428bf9778
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Before this commit, clicking on a x2m field when form view is not
editable (edit=0) did not open the dialog to show the related record.
After this commit, the dialog opens when clicking in a x2m field
of a non editable form view.
closesodoo/odoo#88378
X-original-commit: 80acf449bcaf5ff3d2ba81d84efc0498bc78c533
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Task: 2817024
1. l10n_cl uses _prepare_tax_lines_data_for_totals_from_invoice() and _get_tax_totals() to prepare invoice totals for exporting invoices in pdf.
After the recent changes these methods no longer exist and invoice totals should be calculated in a different way.
2. Contact widget should not have ```'no_tag_br': True``` anymore to show the address properly.
closesodoo/odoo#88144
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
When creating a user and employee from the wizard, the employee was
taking the default name from the context instead of the one chosen
in the wizard.
closesodoo/odoo#88368
Taskid: 2819821
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When starting the mass_mailing design option, some manipulations
are done on the `#design-element` style element. This can result in
sudden style changes when clicking the design tab.
This commit makes it so these manipulations are done as soon as
mass_mailing starts. In order to do that, constants were shared from
mass_mailing_snippets.
closesodoo/odoo#88318
Related: odoo/enterprise#25753
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Loading in background is supposed be background and not block UI after 3 sec of
loading.
STEPS:
* In `pos.config` set `[x] Limited Products Loading`, and `[x] Load all
remaining products in the background`
* add enough products to POS, e.g. 40 000
* Open pos
BEFORE: background loading triggers UI Blocking if it takes more than 3 seconds
AFTER: products/partners are loaded in background without interrupting UI
---
opw-2817770
closesodoo/odoo#88330
X-original-commit: 64232893886c6613212885a382b6f0732c091ef2
Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit replaces getters in `ComposerSuggestion` component to fields in
model `ComposerSuggestion`.
Getters in component are a problem for many reasons, notably that business
code is in component and not in modelling. Code that are not in modelling are
hacky, hard to maintain, and very prone to bug. That's why it's important to
move most code in components to models.
Task-2793280
closesodoo/odoo#88315
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Install FR accounting and have a FR company setup with VAT
Create a bill with bill date different from accounting date
Export FEC under Accounting>Reporting>FEC
For the created bill the accounting date will be used, while it should
be taken first the bill date
opw-2680288
closesodoo/odoo#88319
X-original-commit: 2b1fc6a9b48e423e8f299ebeb723c95302aa13ea
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Field name on sponsor are not required. So when we display the image of a
sponsor without field-name it will use the rec_name 'name' that is not set
and so False.
It will crash during rendering of the widget image that use it.
Now we force to use a field required 'partner_name' to avoid the crash.
By default, when you confirm the sale_order from the backend, we copy
the partner name in field name.
Because we use a class avatar to have a max-width of 96, we don't need
to use a image_512, image_128 is enough in most of case.
The max-width option on widget image has no effect on rendering.
In other case where the rec_name is Falsy and we don't provide other name to
the widget, we now use a default 'name' value to avoid a crash:
closesodoo/odoo#88296
Attributeerror: 'bool' object has no attribute 'replace'
X-original-commit: b054dfc715afb225eb032a722ec58e6888b1b905
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Before this commit, when the user clicks on the Purchase Order row in
costs of project profitability section displayed in right side panel,
the action redirects the user to the list view of `Purchase Order Line`
even if there is only one record.
This commit fixes the issue to display the form view when there is only
one record to display.
task-2814466
closesodoo/odoo#88219
Related: odoo/enterprise#26004
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, in the project right side panel, we use the action
used with the stat button displayed in project form view. This action
has a pivot view grouped by invoice type. However, in the right side
panel, the timesheet invoice types shown in revenues and costs
subsection of the project profitability section does not need this group
by but we would like to group by invoice (if the row concerned
"Timesheet (Billed on Time)") or group by employee (for the other rows)
This commit changes the action to use the action as template created
for Sales section in project right side panel. With this changes, we
no longer have to change the views to have the ones expected, we will
just change the pivot view according to the row selected (concerning the
timesheets part) in Profitability section.
task-2814466
Part-of: odoo/odoo#88219
This commit add a css style when a td (= table column) has the class
`text-bold` to put in bold the text in that column.
task-2814466
Part-of: odoo/odoo#88219
This commit adds some default values for the action used in the SOLs
containing a service product shown in the Sales section.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, the PO is only taken into account in the project
profitability if the quantity to invoice or the quantity invoiced is
greater than 0 in its lines. However, we could take into account the PO
when it is confirmed and the products ordered are not delivered to have
an idea on the costs impacted by this PO.
This commit computes the costs impacted by the PO linked to the AA from
the project if the PO is confirmed and there is a quantity ordered or
invoiced or to invoice in its lines. If no quantity to invoice is found
then the amount to invoice will be the price unit of the product
multiplied by the difference between the quantity ordered and the quantity
invoiced.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, the `name_get` method is override in
`sale_timesheet` module to add the price_unit when more than one SOL is
shown for the same product in the same Sale Order. This override adds
the price unit only when the `with_price_unit` key is in the context, so
it is only used in the `sale_line_id` field defined in `project.project`
and `project.task` models and also `so_line` field in
`analytic.account.line` model when the user wants to set a SOL for those
models. However, the Sales section displayed in project right side
panel is added in `sale_project` and so we cannot use the override in
that module since `sale_timesheet` is not installed when `sale_project`.
This commit moves the part concerning the `with_price_unit` of the
`name_get` override defined in `sale_timesheet` module to `sale_project`
one. And then, we will use the context key in the Sales section to
display the price unit when there are more than one SOL for a same
product in a same Sales Order.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, when the user clicks on "Manufactoring" row in
Project Profitability section displayed in right side panel the user
arrives in the tree view if there are more than one record. If he
filters the records and found no record then no help message is shown,
he has just an empty list view.
This commit adds a help message for that action to dislplay it when no
record is shown in the list view (or another view) for this action.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, all rows about timesheets in the revenues of project
profitability section can be clickable and shown the timesheets related
grouped by invoice. However, the invoice is only linked to the
timesheets containing a SOL with the invoice type of the product is set
to 'delivered' and the service_type of this product is set to
'timesheet'. It means only one timesheet row in the revenues has some
timesheets with an invoice linked.
This commit only group by invoice the views in the action called when
the user clicks on 'Timesheet (Billed on Time)' row name.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, by default 10 sales order items are shown in the
Sales section displayed in the right side panel of project update view.
This section takes much place when there are 10 rows by default.
This commit reduces the number of Sales Order Items to 5 records
to display by default when the user arrives in the project update
view with the right side panel. By the way, if the user wants to see
more Sales Order Items, he can click on "Load More" button to see 5
additional Sales Order Items.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, when the user clicks on the Material row shown in
the project profitability section, he can see the SOLs from another
saleman even if he has just the "See own documents" access rights on
Sales app. Moreover, the check to allow the user to click on a SOL name
in Sales section to get either the timesheets and the stock moves
related is done in sudo and so we do not take into account the rules
defined for the current user.
This commit filters the Sales Order Items to show for the user if
he can see the Sales Order(s) related. it removes the sudo to
correctly filter the SOLs and get only the ones accessible by the
current user.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, the user could having a bit difficult to read a
row in Sales or Profitability section shown in right side panel of
project update view since there is not much space between 2 rows.
The idea is to add a color when the user hover a row to correctly see
the row that he sees.
This commit greys a row when the user hovers a row like we did for the
line in the milestone section in the right side panel.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, when the amount is big the monetary symbol is
displayed either above or below the amount associated.
This commit replaces the basic space by a no line break space to keep
the symbol at the same line than the amount.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, when the user clicks on a row in Sales section
displayed in the right side panel of project update, the action display
the list view even if there is only one record to display.
This commit passes the `res_id` with the action to the frontend to
call the action and directly display the form view when we are sure
there is only one record to show.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, when the user clicks on the expense row shown in the
project profitability displayed in the right side panel of the project
update. The action displays the list view instead of directly the form
view.
This commit checks the number of records is equal to one to display the
form view directly if the number is one.
task-2814466
Part-of: odoo/odoo#88219
Before this commit, the context retrieves when the user clicks on a
Profitability section is not parse, and since this context is a string
containing the JS object with the context added, the context is not
correctly added with the existing context.
This commit parses the added context to correctly append it with the
initial one.
task-2814466
Part-of: odoo/odoo#88219
Current access rule requires fetching all members of each channel, which does not scale.
Use is_member field instead, and make sure itself does not fetch all members.
task-2818759
closesodoo/odoo#88221
Related: odoo/upgrade#3422
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When adding a landed cost and selecting Manufacturing Order, the name of the receipt of the subcontracted products is now shown as well as the MO name for subcontracting orders.
Task: 2667152
Community PR: https://github.com/odoo/odoo/pull/88199closesodoo/odoo#88199
Signed-off-by: Arnold Moyaux <arm@odoo.com>
As social medias can no longer be d-none in the DOM, some code can be
removed from the social media snippet option.
task-2739937
closesodoo/odoo#85476
Related: odoo/upgrade#3292
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
As social medias are now created dynamically, invisible (d-none) social
medias can be removed from the templates.
task-2739937
Part-of: odoo/odoo#85476
As the s_share options are now shared options between s_share and
s_social_media, the XML option code has to be in a shared file.
task-2739937
Part-of: odoo/odoo#85476
When you compare two products on the ecommerce with the Base Unit Price enabled,
an error occurs.
To reproduce the issue:
1. Install the eCommerce app.
2. Go to the settings of eCommerce and activate the options "Base Unit Price" and "Product Comparison Tool".
3. On the website, go to the shop, and compare two products.
Solution: The XML was passing an invalid argument (unset variable) to the 't-call'.
The argument was in fact unecessary as the argument is already defined in the 't-foreach'.
opw-2802682
closesodoo/odoo#88294
X-original-commit: 91a3a3803c7569ccb755266c8bec2fd7b2a6c315
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
On a receipt, when defining the expiration date of a lot, the SML keeps
<today> as expiration date
To reproduce the issue:
1. Edit the operation type "Receipts":
- Show Detailed Operations: True
- Use Existing Lots/Serial Numbers: True
2. Create a product P:
- Type: Storable
- Tracking: By Lots
- Expiration Date: Enabled
3. Create a planned receipt R with 1 x P
4. Mark R as Todo
5. Add a detailed operations:
- 1 x P with new lot L
6. Edit the lot:
- Expiration Date: <today + 7days>
Error: When saving the picking (with the lot updated), the expiration
date is incorrect (set to <today>).
OPW-2785256
closesodoo/odoo#88283
X-original-commit: dd78e43a6286f798c54cf6b3222d3861b9dad34f
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Before this commit, when the user duplicates a project with subtasks the
subtasks are duplicating twice. This is because we now duplicate the
subtasks when a task is duplicated.
This commit fixes this issue to duplicate once the subtasks when the
project is duplicated.
Steps to reproduce:
==================
1) Create a project A
2) Create a task T with a subtask
3) Duplicate the project A
Expected Behaviour:
==================
The duplicated project should have 2 tasks (subtasks included)
Actual Behaviour:
================
The duplicated project has 3 tasks (subtasks included), the subtask is
duplicated twice.
This bug has been found during the development of task-2726465
Related PR: #86997closesodoo/odoo#88264
X-original-commit: dcf780026bfa7d76a58aa766b8d190022818ce45
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The tax map was used in a previous version of the invoice template, it
was superceeded by 'tax_details', which uses the
_prepare_edi_tax_details function
closesodoo/odoo#87734
Signed-off-by: Josse Colpaert <jco@odoo.com>