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>
If applied, this commit will fix the following bug by using the price
with the additional cost added instead of only the price
Steps to reproduce:
1- install sales
2- create a product p with variant pv
3- set an extra value for pv
4- go to Products>Product Variants
5- open the pv in form view
6- the Sales Price is the price of p not pv
(which should be p + extra value)
7- also the tax string is calculated on p not pv
Bug:
```list_price``` is being used
Fix:
replace ```list_price``` with ```lst_price```
OPW-2774199
closesodoo/odoo#88270
X-original-commit: 46526f629f7645eaac8ce86e81e806cfa392b8b8
Signed-off-by: William André (wan) <wan@odoo.com>
Issue:
Imagine today is the April 7th 2022 and we set the inventory frequency to 90 days. If our last inventory date was on January 12th 2022, the next inventory date should be set to April 12th 2022. However, it is being set to January 27th 2022 which is wrong.
The next inventory date should be last inventory date + cyclic inventory frequency.
OPW-2795459
closesodoo/odoo#88267
X-original-commit: 990758ebbed294c8f25d90a5e4f6a7455be97a31
Signed-off-by: Arnold Moyaux <arm@odoo.com>
When creating a backorder for a manufacturing order, procure method for
its moves are lost in the process, as the the field is set to copy
False. But the split of a manufacturing order is not a usual copy case.
In this specific case, we need to keep the procure_method of the copied
moves, as it keeps the two/three-steps routes working for the splitted
manufacturing order.
Task-2797359
closesodoo/odoo#88208
Signed-off-by: Arnold Moyaux <arm@odoo.com>
This module replaces both website_sale_coupon and
website_sale_gift_card.
Connects sale_loyalty with website_sale to allow for promotion programs
in eCommerce.
TaskId-2675382
In a subcontracting flow, the extra_cost on the subcontracted production
is read on the purchase line (via _get_price_unit() ) at the production
creation. In case the price unit on this purchase line change before the
validation, the stock valuation layer linked to the production will not
take this new value into account.
This commit ensures the price unit is the right one at validation
Note: the first version of the current fix broke a use case. The test
`test_tracked_compo_and_backorder` has been added to protect that use
case.
closesodoo/odoo#87817
X-original-commit: 1ff1b4a9a2b9ab27b29fdcac93731fa053c77cc7
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Co-authored-by: William Henrotin (whe) <whe@odoo.com>
Co-authored-by: Adrien Widart <awt@odoo.com>
To reproduce:
1. Create a grouped tax with multiple taxes. Reorder the tax
items. (Important step.)
2. Assign tax to the product.
3. Open pos loading the product.
4. a. [BUG] If pos config is tax-included -> non-responsive ui.
4. b. [BUG] If pos config is tax-excluded:
Add the product. -> non-responsive ui.
Fix:
With the new reactivity in owl, mutating reactive objects will
trigger rerender. However, computing tax amount of orderline
or product with grouped taxes result to mutation of a reactive
object, triggering an infinite render (render -> compute with
mutation -> will trigger another render -> ...).
The call to sort is mutating the reactive array referred by
`children_tax_ids`. To prevent this infinite render, the solution
is to use a copy of the array when sorting the taxes.
OPW-2816546
closesodoo/odoo#88245
X-original-commit: b273056a12a34fec75d980e8a4a08ebaedad7e9c
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Inline styles applied by the editor should always have priority over the
general stylesheet. This failed in the case of nested styles (a <font>
with a color within a <span> with a font size for instance).
closesodoo/odoo#88004
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
To give a custom style to a template, we need to add a style element at
its top, with the id "design-element", and apply to it the supported
styles. These supported styles and their selectors can be seen in the
`DEFAULT_CSS_OBJECT` constant in `mass_mailing_snippets.js`.
However, comma-separated selectors were not supported, meaning styles
could only be incomplete.
task-2816655
Part-of: odoo/odoo#88004