When instantiating a new registry, this piece of code is called
try:
odoo.modules.load_modules(registry, force_demo, status, update_module)
except Exception:
odoo.modules.reset_modules_state(db_name)
raise
For a new database, load_modules will create the table ir_module_module
in the same transaction as everything else. This means that if any error
occurs, the transaction is rollbacked and the table ir_module may not
exist.
`reset_modules_state` will try to access ir_module_module table leading
to another error and an unecessary and confusing error log.
2023-04-26 12:05:34,823 616958 ERROR ? odoo.sql_db: bad query: UPDATE ir_module_module SET state='installed' WHERE state IN ('to remove', 'to upgrade')
ERROR: relation "ir_module_module" does not exist
LINE 1: UPDATE ir_module_module SET state='installed' WHERE state IN...
^
2023-04-26 12:05:34,823 616958 ERROR ? odoo.modules.registry: Failed to load registry
2023-04-26 12:05:34,824 616958 CRITICAL ? odoo.service.server: Failed to initialize database `test-base`.
Traceback (most recent call last):
File "/home/xdo/osrc/master/odoo/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/xdo/osrc/master/odoo/odoo/modules/loading.py", line 386, in load_modules
raise Exception('An error')
Exception: An error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/xdo/osrc/master/odoo/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-14>", line 2, in new
File "/home/xdo/osrc/master/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/xdo/osrc/master/odoo/odoo/modules/registry.py", line 92, in new
odoo.modules.reset_modules_state(db_name)
File "/home/xdo/osrc/master/odoo/odoo/modules/loading.py", line 622, in reset_modules_state
cr.execute(
File "/home/xdo/osrc/master/odoo/odoo/sql_db.py", line 311, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedTable: relation "ir_module_module" does not exist
LINE 1: UPDATE ir_module_module SET state='installed' WHERE state IN...
With this commit, we check the ir_module_module table existance avoiding
an exception and revealing the minimal traceback.
2023-04-26 12:11:21,218 617810 INFO ? odoo.modules.loading: skipping reset_modules_state, ir_module_module table does not exists
2023-04-26 12:11:21,218 617810 ERROR ? odoo.modules.registry: Failed to load registry
2023-04-26 12:11:21,218 617810 CRITICAL ? odoo.service.server: Failed to initialize database `test-base`.
Traceback (most recent call last):
File "/home/xdo/osrc/master/odoo/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-14>", line 2, in new
File "/home/xdo/osrc/master/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/xdo/osrc/master/odoo/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/xdo/osrc/master/odoo/odoo/modules/loading.py", line 386, in load_modules
raise Exception('An error')
closesodoo/odoo#119820
Exception: An error
Signed-off-by: Raphael Collet <rco@odoo.com>
When converting a lead to an opportunity and merging with existing
opportunities, the list view showing opportunities is very tiny.
This is caused by the field not having the correct colspan, as its label is
hidden with the "nolabel" attribute.
This commit fixes it by assigning a colpan of 2.
Task-3179173
closesodoo/odoo#119790
X-original-commit: 6a003a12c92d215f8123538473eeb23a36e9ec7e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit focuses on removing all references to discuss.channel from
controllers of mail module.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119523
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, users could not query properties
with the domain selector. Now, all the properties are
listed when selecting a properties field.
task id: 3283212
closesodoo/odoo#115270
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
The price_manually_set variable was used to largely, we fix it
by adding a price_automatically_set variable. The price_manually_set
is now used when changing the price through the numpad, whereas
price_manually_set is used to indicate that the price is not
the price set in the database.
closesodoo/odoo#119362
X-original-commit: aa4f346d27aa28c23f8ee02fe73b892a1f5ef2dc
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Failing use case:
Create a vendor bill and use the auto-complete field to select a purchase order multiple times.
The purchase order gets added to the vendor bill multiple times, this doesn't happen in V15 and was never intended.
The reason is simply that the code was checking on self.line_ids which get only populated after the record is saved and its invoice_line_ids are synchronized. Before that, only the field invoice_line_ids is filled witht new_ids.
opw - 3196149
closesodoo/odoo#119758
X-original-commit: 29d5862d447dd369432b345e43d5875d3b2a4474
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit:
The scheduled action will repeatedly time out if the number of visitors
to remove is too high. In the case of the client, he has ~ 4 millions
inactive visitors to remove. This might happen after a bot spam attack.
After this commit:
The visitors are removed by batch of 1000, reducing the number of old
visitors with time
opw-3256349
closesodoo/odoo#119757
X-original-commit: b69917ec0e508f8354d831525c5c48ee79b5967a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Steps to reproduce the issue:
- Open a website page in edit mode.
- Drag and drop several snippets onto the page.
- Add a 'Fade In Right' animation to an element on the page.
- Exit edit mode.
- Change the website language to Arabic to display the scrollbar on the
left.
- Test the animation.
- Bug: the scrolling (using the mouse wheel) becomes stuck or very slow
during the animation.
The issue only occurs with Chrome or Edge browsers and seems to be a
browser display issue. It happens only when animated elements overflow
to the left.
This commit fixes the problem by adding an 'overflow: hidden' to the
main element during RTL page animations. This is not the best solution
because the animated elements become non-visible outside the main
element, creating a difference, for example, with the 'Framed' page
layout.
opw-3260399
closesodoo/odoo#119766
X-original-commit: 69184ea84c78de33d47f1e952530cceb568c937b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Reproduction:
1. Create a 1 by 3 table, input something in the first cell
2. Go to the second cell, hit backspace
3. The second cell is deleted and the third cell is moved to the second
cell
Note: in 15, we don’t have the table selector to remove a row of the
table but that is another issue
Fix: when we try to delete the table cell and the offset is 0, nothing
should be done. Also added a test to make sure the cell is unchanged
when we try to delete in an empty cell which has a cell with content
at the left. Also we skip the rejoin block step if there's a table cell
element is invoivled because the cells are not deleted and rejoining
them is not needed
Task-3171904
closesodoo/odoo#119765
X-original-commit: f62275ddb3967ff769cddcde070b4688d36dc4dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Description of the issue/feature this PR addresses:
In kanban view of field service, there is a break line between partner name and
partner city.
Current behavior before PR:
partner name and partner city are in different line.
Desired behavior after PR is merged:
partner name and partner city are in same line.
Fix:
in kanban view of project module, partner city is inherit from the industry_fsm
module. Style is added in both the fields(partner name and city), due to which
line break is occurs. so style is removed from both the fields and added to the
parent <span> tag of the fields. <t> tag is converted into <span> tag so that
style can be applied.
task-3252521
closesodoo/odoo#119760
X-original-commit: f35b534e6e86d3b5848f3e9cb6aa4d6e0b0c1854
Related: odoo/enterprise#40331
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
All major systems (debian stable, ubuntu lts, windows) support py3.8
and all dependencies used by Odoo come with wheels for that version.
Most developers at Odoo SA uses 3.8 already and runbot is using ubuntu
jammy (which comes with py3.10) to test the current 16.0/master.
closesodoo/odoo#119492
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit focuses on removing all references to discuss.channel from
code located in /models of mail module.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119413
Signed-off-by: Debondt Didier (did) <did@odoo.com>
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>