a new context `prefetch_langs=True` allows ORM to prefetch all translations of
translated fields while fetching.
For example
The activated languages are 'fr_FR' and 'nl_NL'
In the database the value is '{"en_US": "English", "fr_FR": "French"}'::jsonb
after fetch with `prefetch_langs=True` the raw cache value will become
{'en_US': 'English', 'fr_FR': 'French', 'nl_NL': 'English'}
closesodoo/odoo#116947
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit allows the exact search of a text that is searched between dashes.
Examples: 0EUM => VAT 0% EU M.
21M => 21% M , 21% EU M, 21% M.Cocont and 21% EX M.
21 M" => 21% M and 21% M.Cocont.
21" M"co => 21% M.Cocont.
X-original-commit: ad2682c513c82052539cf99a54994b035b2afe6d
Part-of: odoo/odoo#119756
Steps to reproduce:
- put the currency of the bill to eur
- change the partner with a partner with no purchase currency set
Issue:
The bill is re-set to usd
Note:
addendum to https://github.com/odoo/odoo/pull/116852
opw-3233527
closesodoo/odoo#119753
X-original-commit: 51ff9c6026b8f9079aba7c9e26891f62c782761d
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Steps to reproduce:
- company currency = USD
- set a partner P with a `property_purchase_currency_id` in EUR
- create a bill with Azure partner and set an bill line
- change to partner P
issue -> the currency of the line has not been change
- change to Azure
issue -> no change about the currency
Cause:
- We update the move.currency_id but not the line_ids.currency_id
- after setting Partner P, we try to set a partner that no `property_purchase_currency_id`, we do not enter in the condition
opw-3233527
X-original-commit: 213e22c63f6259e2e69193b7d6a7022d8b6eab20
Part-of: odoo/odoo#119753
In sentry we receive like 2k syncing issue from google_calendar.
This commit converts `_logger.error` to `_logger.warning` because we don't
need an erro for that
sentry-4121123364
https://online.sentry.io/issues/4121123364closesodoo/odoo#119742
X-original-commit: e797712561113f098edc1346995cecd7e96ad362
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
Previously, LinkDialog always focused on the first editable input field.
This commit introduces a new option in the LinkDialog constructor,
`focusField`, that allows to designate a specific field to focus on.
This option is now used to focus on the second editable input field when
the first one is already filled (for example, from the user selection).
task-3224551
closesodoo/odoo#119699
X-original-commit: 70649465c35736ae5a8b918817bfd0f598600852
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
To reproduce the issue:
1. create a product category with inventory valuation set as Manual
2. create a landed cost product using above category
3. enable anglo saxon accounting in accounting settings
4. create a vendor bill with this product and click save
Error: An error is displayed because of a missing account
When creating the AML, `_compute_account_id` tries to find the
appropriate account. However, for a landed cost, it always use the
the stock accounts, even if they are not defined. We should rather
recycle `/stock_account._compute_account_id` which already handle
such a situation.
OPW-3251714
closesodoo/odoo#119564
X-original-commit: 9416be3cbe630ed693a0285f203e1de9f45acc7a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
When a product category valuation is set to `real_time`, we use the
stock accounts. However, in the code, to know which account we
should use, we do: "use stock accounts if defined, else use basic
ones" (the best should be "use stock accounts if `real_time`" but
this refactoring task will be done in master). So, here, we need to
ensure that stock accounts are not defined when the valuation is manual.
This is the case when installing `stock_account` module: the
valuations will be set to manual, so we need to force the stock
accounts to `False`. Same when creating a new company, we also need to
ensure that the stock accounts are not defined. This explains the
changes in `_post_load_data`
About changes in `_check_valuation_accouts`, the explanation is in
the method body: the defined values directly depends on the value of
`property_valuation`
Note about test modification: for the tests in `stock_landed_costs`
module, we set the categ to auto so the stock accounts are defined.
Otherwise, when validating the landed costs, it will lead to an error
https://github.com/odoo/odoo/blob/9cd316f038dc95051814ede9474f8f15f7d165df/addons/stock_landed_costs/models/stock_landed_cost.py#L396-L397
OPW-2746384
X-original-commit: 2780c37cfdb8560ac7c725fd27f4fe272f1d3072
Part-of: odoo/odoo#119564
Bug exists since a long time ago, but because url is empty, nobody
reported it before today since the consequence is just to don't have
any link.
On our prod we have some automation/customization that make this bug
visible.
opw-3257270
closesodoo/odoo#119554
X-original-commit: 5a5ee4a73ede391877bfef51a0aafcefa682e856
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Since [1], some bus tests were failing in a non-deterministic
way. This PR fixes the issue.
[1]: https://github.com/odoo/odoo/pull/119525
Fixes runbot errors: 20755, 20756, 19933.
closesodoo/odoo#119807
X-original-commit: c52670c9e91c369410422afacfbd9080d432e8bd
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
As of https://github.com/odoo/odoo/pull/107714, the invoice layout
structure changed, and the hook on a `clearfix` class now ends up
targetting a different `div` inside the layout.
This causes the exhange rate info for non-AED invoices to be crammed
under the invoice totals where it does not fit at all, so everything
overlaps to the point of being unreadable.
Fix: target a more reliable element based on the newly introduced id
`right-elements`.
closesodoo/odoo#119769
X-original-commit: 74055b8e65acbbdfb48a876412974b48cfdc6e8a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Due to performance issues, the computation of the balance in GL was changed (odoo/odoo#103697)
Since it is computed in `_get_journal_dashboard_bank_running_balance` as the last statement balance (balance_end_real) + transactions (account.bank.statement.line since the last statement), we rename the label on the journal dashboard to "Running Balance".
Also, fix the order clause of the "Last Statement" balance as it has a problem when there are 2 statements on the same day.
OPW-3265511
closesodoo/odoo#119764
X-original-commit: 383f52ac2b75a839469323a1e71b4c2ea76f8393
Related: odoo/enterprise#40334
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
In 16.2, we made a task (https://www.odoo
.com/web#id=3097097&cids=1&menu_id=4720&action=333&active_id=967&model=project
.task&view_type=form) to improve the layout of invoice. But the l10n_ec
localisation was wrongly impacted due to a xpath. This commit correct that by
adding an id on payment terms and the enterprise pr will change the xpath.
opw-3097097
closesodoo/odoo#119672
X-original-commit: 579c9f615db06f0581c3b6802cb695fafc8682cb
Related: odoo/enterprise#40291
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
In Switzerland, it is mandatory, when a QR bill is printed, to use a line to separate both the QR part from the rest of the page and, within the QR zone, the receipt from the payment part.
This was done using dotted lines on the bill.
However, while generating the PDF caused no problem, the snailmail provider can't print the bottom, far left and far right borders since those are outside of the printing zone.
After further research it does however seem that those are not mandatory, unlike the two separations aforementioned.
Removed those to allow for snailmail printing.
opw-3223714
closesodoo/odoo#119728
X-original-commit: 1326ad2a21e2d9aade1ad2ff4444e595c1caabad
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
1. Install [Timesheet], [Sales]
2. Settings > Time Encoding > Encoding Method > Days/Half-days
+ Make sure the company has more than 1 employee from Employee app
3. On Products, edit Service product type to have:
- invoicing policy: based on timesheets
- create on order: project
- uom: Days
4. On Sales app, create a SO and add a service with a price
- automatically a project will be created
5. On Timesheet app, create a project linked to the SOL
6. Create a task and set timesheet 1 day
7. Go to [Timesheet] > [Reporting] > [By Employee]
8. Group by SOL and dipslay the MEASURE 'Timesheet Revenues'
Issue: Revenue is multipled by the unit measure of day in hours
Impacted version: 16-master
opw-3255928
closesodoo/odoo#119707
X-original-commit: 8898452d1dd5b4ae8332fd369b0cb6211ee62fc4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
There was an issue before this commit where some flags (basically all
the ones which are not tribands) would appear "broken".
This is the case for the China one where the symbol on the flag would be
squashed.
Using `object-fit` css property will keep the original flag ratio.
task-2929438
closesodoo/odoo#119683
X-original-commit: 5d6559218926a4c2f055bd55f113c7bfc83cd5b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
On some mobile devices (eg Samsung Galaxy S22), the datepicker
immediately closes when trying to apply a custom date filter
Steps to reproduce:
1. Install Sales
2. Open Sales
3. Click on the search icon then on the filter icon
4. Click on 'Filters' and add a custom filter on field creation date
5. Click on one of the dates
6. The datepicker opens and then closes immediately
Solution:
Do not hide the datepicker when a scroll is made on mobile devices
Problem:
When opening the datepicker, the keyboard would show up, scrolling the
view which triggers the closing of the datepicker
opw-3166801
closesodoo/odoo#119682
X-original-commit: bd6ed025fae33ff3b0444d34142e1577a457b77f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Since we've changed Bootstrap version from 4 to 5 the way to create a
popover has changed.
So we adapt it to the new way to declare popovers in the website form
closesodoo/odoo#119680
X-original-commit: 0cff1dc2967cafeb8964ed0802c309d3bb7f7525
Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit brings a few improvements to the project.project and project.task
search views.
Task-3264820
closesodoo/odoo#118515
Related: odoo/enterprise#39766
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit removes the module "web.dom_ready" and
adapts the modules that imported it.
This module was used to wait for the content to be
loaded to manipulate the dom after that.
The goal is to remove async modules and simplify the
module loader in the future.
task id: 3265979
closesodoo/odoo#119158
Related: odoo/enterprise#40051
Signed-off-by: Géry Debongnie <ged@odoo.com>
The employment type and first contract date were made available on the
public employee, however those fields but don't need to be publicly
available.
odoo/upgrade#4539
task-3252610
closesodoo/odoo#118333
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Current behavior:
If you add a sale description to a product, it will not be added to the
invoice created from the PoS.
Steps to reproduce:
- Add a sale description to a product
- Create a PoS order with this product
- Create an invoice from the PoS order
- The sale description is not added to the invoice
opw-3221481
closesodoo/odoo#119516
X-original-commit: 37538c876f30fb1b3a9368f12a16edb1806777f8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Steps to reproduce the bug:
- Open an empty page (e.g. the home page) in Website edit mode.
- The "DRAG BUILDING BLOCKS HERE" message is missing in the '#wrap'.
Since the commit [1], we have made modifications to the
'%o-editor-messages' mixin, which is used on the '#wrap' element, to
hide the editor message if the element is not the only child. However,
another commit [2] was added afterwards, which introduced a new div
called '#o_shared_blocks' next to the '#wrap' element. As a result, the
'#wrap' element is no longer the only child, and the message is never
displayed again.
To fix this, we took the rule out of the mixin to only use it where we
need to (for '.oe_drop_zone').
[1]: https://github.com/odoo/odoo/commit/6ee778fdbcd92dbefd08c8551ea654d352ad0dc0
[2]: https://github.com/odoo/odoo/commit/6007264afb83dcfed1693d72179cb156ff2254b6
task-3270409
closesodoo/odoo#119621
X-original-commit: d4b7a9e877804cd6bbdc0d15b1ab1c03561a4a86
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, a domain of the form "[(.., .., -1)]" would be
incorrectly represented in the domain selector as .., .., undefined.
The root cause was that py_js view the sub expression -1 as the
application of the operation - to 1 and thus create an AST of type 6 for
it. The domain selector did not expect to get such an AST but did not
crash either. Here we make it extract the intended value from the AST
for -1. More complex expressions like 3-1 are still not supported.
closesodoo/odoo#119620
X-original-commit: f9604da60c6650ad46aafe08e9fad118654a149b
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Before this commit, when loading discuss app with
`active_id=discuss.channel_1` in URL, the discuss app did not
auto-select the conversation.
This happens because the code did not parse model and id part of
"discuss.channel_1": it split into `discuss.chann` and `l_1`,
instead of `discuss.channel` and `1`. This comes from splitting
the same way as legacy `mail.channel`, starts with 13 characters,
although there are now 16 characters in `discuss.channel`.
This commit fixes the issue by simplify the way the active thread
of discuss is deduced from active_id.
closesodoo/odoo#119559
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Enforce strict types for returned values for
* create
* write
* unlink
* default_get
to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.
closesodoo/odoo#116809
Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Clicking on an emoji from the emoji picker while holding down the Shift
key now prevents the emoji picker from closing, allowing users to easily
select multiple emoji in one go.
Task-3288704.
closesodoo/odoo#119598
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
To reproduce on runbot:
- go a to an existing task
- clear the "Analytic account" field
- add a timesheet line
- save
It then crash with the following error:
```
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/data/build/odoo/odoo/http.py", line 1698, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/data/build/odoo/odoo/service/model.py", line 134, in retrying
result = func()
File "/data/build/odoo/odoo/http.py", line 1725, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/data/build/odoo/odoo/http.py", line 1922, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/data/build/odoo/addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._dispatch(endpoint)
File "/data/build/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/data/build/odoo/odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/data/build/odoo/addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/data/build/odoo/addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/data/build/odoo/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/data/build/odoo/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/data/build/enterprise/industry_fsm_stock/models/project_task.py", line 101, in write
result = super().write(vals)
File "/data/build/enterprise/helpdesk_fsm/models/project_task.py", line 45, in write
res = super().write(vals)
File "/data/build/odoo/addons/project_sms/models/project_task.py", line 25, in write
res = super().write(vals)
File "/data/build/enterprise/project_enterprise/models/project_task.py", line 288, in write
res = super().write(vals)
File "/data/build/odoo/addons/hr_timesheet/models/project.py", line 385, in write
res = super(Task, self).write(values)
File "/data/build/odoo/addons/project/models/project.py", line 2050, in write
result = super().write(vals)
File "/data/build/odoo/addons/mail/models/mail_activity_mixin.py", line 241, in write
return super(MailActivityMixin, self).write(vals)
File "/data/build/odoo/addons/rating/models/rating_mixin.py", line 101, in write
result = super(RatingMixin, self).write(values)
File "/data/build/odoo/addons/mail/models/mail_thread.py", line 311, in write
result = super(MailThread, self).write(values)
File "/data/build/odoo/odoo/models.py", line 3813, in write
field.write(self, value)
File "/data/build/odoo/odoo/fields.py", line 4168, in write
self.write_batch([(records, value)])
File "/data/build/odoo/odoo/fields.py", line 4189, in write_batch
self.write_real(records_commands_list, create)
File "/data/build/odoo/odoo/fields.py", line 4369, in write_real
flush()
File "/data/build/odoo/odoo/fields.py", line 4325, in flush
comodel.create(to_create)
File "<decorator-gen-368>", line 2, in create
File "/data/build/odoo/odoo/api.py", line 410, in _model_create_multi
return create(self, arg)
File "/data/build/odoo/addons/hr_timesheet/models/hr_timesheet.py", line 142, in create
vals_list = self._timesheet_preprocess(vals_list)
File "/data/build/enterprise/helpdesk_timesheet/models/analytic.py", line 61, in _timesheet_preprocess
return super(AccountAnalyticLine, self)._timesheet_preprocess(vals_list)
File "/data/build/odoo/addons/hr_timesheet/models/hr_timesheet.py", line 331, in _timesheet_preprocess
account = account_per_id[account_id]
KeyError: False
The above server error caused the following client error:
null
```
closesodoo/odoo#119597
X-original-commit: b86fa6a72cc5eaeb0245cf2092eefde09226aa12
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This PR complete the type definition for the props of the composer and replace
the custom Object by Ref type in the relevant place.
closesodoo/odoo#119593
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit adds two autoresize hooks for text inputs and textareas to
make it adapt their size (width for text inputs, height for textareas)
depending on their content.
The commit therefore solves the issue of several form view task titles
being restricted to 1 line while it can be annoying if the title is too
long. The autoresizeTextarea feature was moved from TextField to the
autoresizeTextarea hook and the autoresizeInput feature was moved from
the AutoresizeInput mail component to the autoresizeInput hook.
The TextField component has a new option for disabling linebreaks.
task-3138826
closesodoo/odoo#117355
Related: odoo/enterprise#39493
Signed-off-by: Géry Debongnie <ged@odoo.com>
*: l10n_fr_pos_cert,portal_rating,pos_adyen,pos_epson_printer,pos_loyalty,
pos_mercury,pos_restaurant,pos_restaurant_adyen,pos_restaurant_stripe,
pos_sale,pos_six,pos_stripe,web
This is part of the continuous effort of refactoring pos addons towards using
more modern modules and programming patterns (such as services). After this
commit, point_of_sale addons are now left with the use of the legacy
`web.concurrency` module because of the `MutexedDropPrevious`. It's okay to keep
it because it's relatively an independent module compared to other legacy web
module.
The following summarizes the changes in this commit.
- import `_t` from `@web/core/l10n/translation`.
- convert `PosDB` to js native class
- remove use of `format` in `TicketScreen`
- To determine the cached orders are up-to-date, we now deserialize the dates
coming from the server using web's `deserializeDateTime` function. Then,
instead of initiating `cacheDate` as native js Date, we use the luxon's
`DateTime` which is supported by the web date utility methods.
- There is no need for the `format` function from `web.utils` legacy module.
- convert `PaymentInterface` to native class
- remove use of `web.config` module
- remove use of `web.time` module
- use `serializeDateTime` from web.
- remove use of `web.rpc`
- remove use of `web.utils` module
- introduce simple check for email address input
- Replace use of `web.utils.Markup` with `@odoo/owl.markup`.
- 'web.utils'.{round_decimals,round_precision,float_is_zero} copied to
'@web/core/utils/numbers'.{roundDecimals,roundPrecision,floatIsZero}.
- These helper functions are not removed from the web addon because they
are also used from other addons that are not linked to pos.
- `floatIsZero` is now computed by directly comparing the result of
`roundDecimals` to zero. This works because rounding a decimal number
which will result to zero will exactly give zero.
- remove use of `web.field_utils`
- Replace `web.field_utils.parse.float` with
`@web/views/fields/parsers.parseFloat`.
- Replace `web.field_utils.format.float` with
`@web/views/fields/formatters.formatFloat`.
- Replace `web.field_utils.format.date` with
`@web/core/l10n/dates.formatDate`.
- Replace `web.field_utils.format.datetime` with
`@web/core/l10n/dates.formatDateTime`.
- convert `PrinterMixin` and dependents to native class
- `PrinterMixin` is converted to `BasePrinter`.
- `Printer` is converted to `HWPrinter` (extending `BasePrinter`).
- `EpsonPrinter` retained its name and is converted to extend `BasePrinter`.
- Moreover, we also removed the convoluted `PrintResultGenerator`, replaced by
simply creating object with the following signature:
```js
{ successful: boolean; message?: { title: string, body?: string } }
```
- remove use of `web.Session`
- replace use of `qweb.render`
- We use `renderToElement` as replacement to templates that produces valid
html.
- Note that `renderToElement` is introduced in `@web/core/utils/render` module
which is extracted from the original `renderToString` method.
- For the epson printer template, we kept the xml layout and manually add
required xml element to contruct the xml that will be sent to the epson in
making print requests.
- use `Mutex` from `@web/core/utils/concurrency`
- remove use of `Markup` when rendering receipt info (`ticket`) in order to
render new lines.
- Remove use of `jquery` in `htmlToImg`.
closesodoo/odoo#117231
Related: odoo/enterprise#39078
Signed-off-by: Samuel Degueldre <sad@odoo.com>
The said method is no longer present since
45d08db3c4. No need to replace it -- it can just
be removed -- because the customer_display already relies on the reactivity
which automatically recomputes the html when dependencies changed.
Part-of: odoo/odoo#117231
To enable VAT validation (VIES/ simple), the base_vat module needs to be installed.
base_vat extends models where the validation should apply. This means it only works with models in account, unless the module is added as a dependency (base_vat depends on account)
To avoid this dependency (in account reports - see enterprise PR odoo/enterprise#34068), two methods required for VAT validation are added to res.partner so that the enterprise module is able to use this feature with/without base_vat.
closesodoo/odoo#106046
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Before this commit:
The AceField component used the ace library to provide the user a code
editing field
After this commit:
The AceField component is now using the CodeEditor component and the usage
of the ace editor lib is now abstracted behind the component.
closesodoo/odoo#117782
Related: odoo/enterprise#39365
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before this commit:
When using the native ResizeObserver, we might get "ResizeObserver loop
limit exceeded" errors but these can ignore, see [ResizeObserver Errors](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#observation_errors).
This error was wrongly handled and would cause another when running tests
involving the ResizeObserver.
After this commit:
The error is now properly detected and ignored when running tests.
Part-of: odoo/odoo#117782
This component was created as an easy way to add a code editing field
without needing a record (unlike the AceField component). It also
completely abstracts the use of the Ace Editor library.
The CodeEditor has been moved to web core as it was needed in other
places.
The name "CodeEditor" was purposely chosen to clearly state what the
component is used for and abstract the use of Ace.
Part-of: odoo/odoo#117782
Current behaviour:
In the project update section, if the project has only draft
invoices linked to the analytic account of the project, the invoices
smart button isn't present. But once we have at least 1 posted
invoice, the button is shown, and when triggering the action, we see
both the posted invoice and all the draft invoices that were not
shown previously.
Expected behaviour:
The button should be visible, even if the only invoices linked to
the analytic account of the project are only in draft.
Steps to reproduce:
- Install Project, Sales, Accounting
- Activate Analytic Accounting in the Settings
- Create a Project and make sure it has an analytic account linked to it
- Create a new invoice in draft, make sure on the line you have set
the analytic account of the project we just created. Save.
- Go to the project update page, there is no smart button that will
go to the invoice we just created.
Reason for the problem:
The Invoices smart button is shown only when the `invoice_count` is > 0.
`invoice_count` is a related field to the same field name of the
analytic account, which is a compute. In that compute we explicitly
only take invoices that are posted, since in the context of an
analytic account, it only makes sense to take actually posted
invoices, since those are real revenues. So the button is shown only
when we have at least 1 posted invoice. The action itself is just
fetching all the `in_invoice, out_refund` invoices that are linked to
this analytic account.
Fix:
Transform the `invoice_count` in `sale_project` module from a
related to a regular compute and do a query with the same heuristics
for the action of the invoice smart button.
Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master
opw-3227421
closesodoo/odoo#119578
X-original-commit: 1b45e22530cb07ca437d2fd53bda3af2c918c223
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit put the same field description between 'sale.order.template.line'
and "sale.order.line"
closesodoo/odoo#119576
X-original-commit: 811cf78ee1e63a7c41efe578fb64ee2deeca1dde
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
With the refactoring of the mail API, use the new
`message_post_with_source()` to ensure the message content is visible
in the chatter
To reproduce:
- Create a quotation template with a confirmation email
- Create and confirm a sale order using that quotation template
=> We expect that confirmation email (content) to be visible in the
chatter, currently the email (mail.mail) is ok but the message
(mail.message) has no body which make it not/partially visible in the
chatter.
closesodoo/odoo#119566
X-original-commit: 6b3d74cde697ea655d5101d9ea426dc814ce2fa1
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
With commit (1), the clear button is only displayed when a selected
value is found from the available choices. But since we used
shallowEqual to find the corresponding choice, we couldn't use objects
containing objects in its values, since a simple comparison was made
in the utility function. This was a wrong usage of the SelectMenu and
we don't want to support objects and arrays as values. The value
attribute should only be a string, and it's the parent responsability
to handle any object related to this string.
The test using an object and an array as values has been removed since
it had no purpose after the removal of this partial and wrong support.
With this fix, an assertion for the presence of the clear button has
been added instead for the import action.
(1): d760b81271closesodoo/odoo#119298
Related: odoo/enterprise#40177
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit fixes the property field tag components and sub-components by
ensuring that the ".bind" function of the component always receives a function.
As the "checkDefinitionWriteAccess" prop is optional, it could crash because
OWL would try to call ".bind" on an undefined function.
The new code will pass an empty function instead as a fallback.
(When it's not passed, it's never called, as it is in a display context and we
do not create tags, e.g: when showing the tags in a kanban view).
Task-3280847
closesodoo/odoo#119565
X-original-commit: 7d52600263bfd911156a2d94041fc522e2baff8a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Steps to reproduce:
- Open any listview (e.g Sales order listview)
- select records from the listview, go to Favorites, and click on 'Insert list in spreadsheet' option
- Once the spreadsheet is created, Reload your browser.
Current behavior:
- Spreadsheet goes to an infinite loading.
opw-3284058
closesodoo/odoo#119561
X-original-commit: 6993d3e36d2f2540100e1bd248b629cc9e191659
Related: odoo/enterprise#40234
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Before this PR, the filter on account root was present 2 times in the journal
items views. By removing one of the two, the problem is solved.
opw-3275279
closesodoo/odoo#119544
X-original-commit: bffa837a3b11144a53300e93249767ce4e9374d2
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
Steps to reproduce:
- create a time off type;
- select 'Extra Days Requests Allowed' for 'Employee Requests';
- select 'Approved by Time Off Officer' for Approval;
- choose a Responsible Time Off Officer;
- change the select for 'Employee Requests' and select 'Not Allowed';
- create an allocation for an employee with this type.
Issue:
The allocation is blocked at step 'TO APPROVE'.
Cause:
Even if we choose `no` for `employee_requests`,
the `allocation_validation_type` always contains `officer`.
Solution:
We have to test the `employee_requests` field during the
validation action
opw-3264758
closesodoo/odoo#119542
X-original-commit: a270267c34d42bba79190422143673f585e554d7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Before this commit, the bus service was starting worker at page
load, regardless on whether the user interacts with chat features.
This commit starts bus worker only when it's really useful, e.g.
when adding a new channel to subscribe. Functionally, on livechat,
the worker does not start before the livechat is open.
Task-3266973
closesodoo/odoo#119528
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>