According to the Argentinean law N° 27440, it is required for MiPyMEs
document types to show in the report the total amount in letters.
closesodoo/odoo#80669
X-original-commit: 9ae95a9a69fd3316b1a217225e8ebacbb51b8fe8
Signed-off-by: William André (wan) <wan@odoo.com>
closesodoo/odoo#80668
X-original-commit: 3ae0b21f4b269859dc41ab6851e2e6e52b6b2e11
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
A wrong fallback value was used, the domain is expecting the employee ID
and not the employee record.
closesodoo/odoo#80663
Taskid: 2675380
X-original-commit: 6e68df1a69079bc16888ad588c97f234c9b9fa07
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, 3 xmlid are duplicated, so the result is not
expected.
This commit changes the duplicated xmlid to create the 6 tasks as
expected.
Part of task-2671848
closesodoo/odoo#80661
X-original-commit: 12e848cb200d4b763563e0b110c963aeb71d706e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
In some circumstance, `this.$target.data('bs.popover').tip` was not
defined until added into the DOM.
Task-2666388
closesodoo/odoo#80657
X-original-commit: 4fdd17b7436984ade2ce97dd57d749cc18c452dc
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Since fd75481d52, we use the survey variable to compute the
background_image_url in the survey_layout. In some cases (notably in
survey_session_code template), this layout is used without knowing the
variable 'survey'.
After this commit, the 'survey' variable is tested before usage.
Also, this commit add the o_survey_background class to the t-attf-class that
already exists on 'wrapwrap' selector. Otherwise, by having both t-att-class
and t-attf-class, only the t-att-class is kept.
Task-2703147
closesodoo/odoo#80656
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Put "Sign Now", "Send" and "Share" into the dropdown menu of "Action" button when the window is too small
Add add "Send" "Sign Now" and "Share" buttons in the list view
Make green saving Kanban in the center of the screen when the window is too small
Change the order of buttons for signature popover
Make "width: 30%" css only for buttons for signature popover to avoid text overflow
change 'Adopt and Sign' to 'Adopt & Sign'
before this commit: there are some overflow and misalignment for buttons
task-2630720
closesodoo/odoo#79292
Related: odoo/enterprise#21671
Signed-off-by: Arnaud Joset <arj@odoo.com>
change the wrong recurrence name like
"Every 1 Months on the -1 Last for 3 events"
to
"Every 1 Months on the Last Thursday for 3 events"
before this task,
If you create a recurrence event and invite another partner in calendar with
* Repeat Every: xxx "Months"
* Day of Month: Day of month: Last Thurday
The recurrence name in the email would be like
"Every 1 Months on the -1 Last for 3 events"
closesodoo/odoo#78809
Signed-off-by: Arnaud Joset <arj@odoo.com>
The cursor features a "transaction" object to manage application-
specific data in relation with cursor operations. In its initial
implementation, the transaction object was created by the registry.
This created a requirement: in order to be used in environments, a
cursor had to be created by registry.cursor().
We now remove that unnecessary technical requirement by making
environments create the transaction object on demand.
closesodoo/odoo#80644
X-original-commit: e902713648bca329e6821859462b2128aad62c09
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
The web_editor dependency with mail was problematic:
- web_editor would not auto_intall without the mail being installed
- A circular dependency problem with discuss
In order to avoid creating a new module shared by mail
and web editor, the use of a hack has been decided.
By checking if `notification_type` is in the session, we ensure
that the module mail is installed.
Task-2698655
closesodoo/odoo#80640
X-original-commit: 4e611d7527f85fc074115bd018adb7d6e5ea2c53
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Antony Lesuisse <al@odoo.com>
The empty template had no thumbnail for the "select your template" tab.
This introduces a simple white one.
closesodoo/odoo#80622
X-original-commit: b1ac5a0167c0463d6d83bf4a8463a5e7432ebc21
Related: odoo/enterprise#22616
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Templates in mass_mailing have been redefined in [PR]: all their custom
styles have been removed so they all are built in a way that they could
be built using the editor only. Since this was done, the "select your
template" tab has been broken because there are no styles to apply.
This fixes the feature by adapting it to the new context: instead of
changing the styles, it applies the fresh template as if we were
starting a brand new e-mail.
[PR] https://github.com/odoo/odoo/pull/77312
task-2702007
X-original-commit: 09a8e58fd59c297727f9f64ec2a434caaf5b9a67
Part-of: odoo/odoo#80622
Simple users lost the ability to read their own paid expenses due to
missing access rights on account.move.
closesodoo/odoo#80646
Taskid: 2698791
X-original-commit: f164967c1eef731e92f41945b9a9fa05099950d9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
How to reproduce issue
-----------------------
- Create a survey with more than one question
- Layout: One page per question
- Complete a first survey
- Start a second survey but don't finish it
- Click on see result
- Click on the answer of the uncompleted answer
you got a traceback
'NoneType' object has no attribute 'id'
Node: <t t-set="page_number" t-value="page_ids.index(question.id)"/>
Why this is happening ?
-----------------------
question is define in survey_page_print template inside a foreach.
The scope of question thus is limited to this foreach.
Solution
--------
Declare question before the foreach in a t-set
closesodoo/odoo#80648
X-original-commit: d80ec72696010d668047c8fb1d9665f6aa1b2ee6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since https://github.com/odoo/odoo/pull/73689 all internal users are no longer
known at init. Unlike what was stated in the corresponding PR, the code of
mentions wasn't actually good enough to allow it without any drawback.
This PR fixes the issue by prioritizing internal users on the result of the RPC.
As a bonus the internal user state is immediately returned when fetching
followers, which allows mentions to be accurate even before the RPC is done.
task-2695224
closesodoo/odoo#80645
X-original-commit: 86de2f231be87b289deb85c3b20b93d890cce918
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this fix, 'currentApp' returned 'undefined' on mobile but
there is no reason not to return the current app on mobile.
This has been fixed in enterprise repository.
Now that 'currentApp' returns a value, we have to explicitly hide
'menuItem' for small screen.
Steps to reproduce:
* Open Odoo on tablet
* Select an App => BUG
opw-2687424
opw-2688832
closesodoo/odoo#80639
X-original-commit: 3659d65f37d08737f99d62ecb8cd486ba8d764f4
Related: odoo/enterprise#22620
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
In a multi-company environment, it is not possible to update information (language, email,...) from My Profile.
The security rule only allows to change information if the right company is selected or if the user has no company.
Since a user assigned to several companies will have several records in hr_employee referring the same user_id, the security rule is now updated to allow updating information from the My Profile page if the hr_employee.user_id refers to the current user_id.
task-2678411
closesodoo/odoo#80637
X-original-commit: 3e9393c71ccf1b00c051155afd68b3a0cfff05cd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
*mass_mailing_crm, mass_mailing_sale
Currently, the Mailing stat buttons have a few problems.
The business reporting smart buttons send the user to a list of linked records,
which doesn't provide much value (e.g. what is the user supposed to do with a
list of 12345 leads?). They also show wrong values depending on access rights.
The Mailing KPI smart buttons lead to a blank screen if there's no data to show.
In this commit, we add/adapt all action helpers to help users understand what is
going on. For the business reporting smart buttons we instead send users to
relevant reporting actions, so they can make sense of the data we showed before.
The values of the business reporting smart buttons are now calculated as a super
user.
We also change some domains from the whole UTM Sale Domain to only using
Source ID, which simplifies computation while staying accurate.
task-2604515
closesodoo/odoo#76798
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Before this commit:
Replying to the answer of /who command in a channel leads to the reply not being
associated with the correct message, it should simply not be possible.
After this commit:
Reply icon will be invisible for temporary or transient message.
Task-2700389
closesodoo/odoo#80623
X-original-commit: 1df56ba9e105bd2766e252be22a320046b815cf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Steps to reproduce:
- Test upgrade request 40290
Issue:
Traceback raised.
Cause:
The _find_delivery_ids_by_lot function can raise a
RecursionError: maximum recursion depth exceeded if
there is a loop in the path of lots.
When running the function recursively for
lot_id contained in produce_line_ids the same lot
can be reached multiple times.
In the case of db 40290:
move_380->move_381
move_381 and move_419 both in lot_1320
move_419->move_423
move_423 and move_380 both in lot_567
move_380->move_381
...(goes on forever)
Solution:
Use a lot_path optionnal argument to test if
a lot has already been visited.
Full Traceback:
```
Traceback (most recent call last):
File "/tmp/tmp81rzi7n7/migrations/testing.py", line 208, in test_check
self.check(value)
File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 85, in check
self.assertFalse(diff, msg)
AssertionError: [('stock.menu_action_production_lot_form', 195, 'Inventory > Master Data > Lots/Serial Numbers', 310), ('mrp.menu_mrp_traceability', 258, 'Manufacturing > Products > Lots/Serial Numbers', 310)] is not false : At least one menu or view working before upgrade is not working after upgrade.
('stock.menu_action_production_lot_form', 195, 'Inventory > Master Data > Lots/Serial Numbers', 310):
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 879, in get
return field_cache[record._ids[0]]
KeyError: 567
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1057, in __get__
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 882, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'stock.production.lot(567,).delivery_count'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 182, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 293, in mock_action
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 319, in mock_view_form
[data] = record.read(fields_list)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3227, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3247, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 5867, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1106, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1265, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/15.0/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4249, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 122, in _compute_delivery_ids
delivery_ids_by_lot = self._find_delivery_ids_by_lot()
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
[Previous line repeated 926 more times]
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 197, in _find_delivery_ids_by_lot
move_lines = self.env['stock.move.line'].search(domain)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 1810, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
query = self._where_calc(args)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
return expression.expression(domain, self).query
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
self.parse()
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4683, in _search
self._apply_ir_rules(query, 'read')
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4464, in _apply_ir_rules
expression.expression(domain, self.sudo(), self._table, query)
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
self.parse()
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
query = self._where_calc(args)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
return expression.expression(domain, self).query
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 431, in __init__
self._unaccent = get_unaccent_wrapper(model._cr)
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 405, in get_unaccent_wrapper
if odoo.registry(cr.dbname).has_unaccent:
File "/home/odoo/src/odoo/15.0/odoo/__init__.py", line 104, in registry
return modules.registry.Registry(database_name)
File "/home/odoo/src/odoo/15.0/odoo/modules/registry.py", line 61, in __new__
return cls.registries[db_name]
File "/home/odoo/src/odoo/15.0/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
RecursionError: maximum recursion depth exceeded
('mrp.menu_mrp_traceability', 258, 'Manufacturing > Products > Lots/Serial Numbers', 310):
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 879, in get
return field_cache[record._ids[0]]
KeyError: 567
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1057, in __get__
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 882, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'stock.production.lot(567,).delivery_count'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 182, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 293, in mock_action
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmp81rzi7n7/migrations/base/tests/test_mock_crawl.py", line 319, in mock_view_form
[data] = record.read(fields_list)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3227, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3247, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 5867, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1106, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1265, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/15.0/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4249, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 122, in _compute_delivery_ids
delivery_ids_by_lot = self._find_delivery_ids_by_lot()
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 204, in _find_delivery_ids_by_lot
for delivery_ids_set in line.produce_line_ids.lot_id._find_delivery_ids_by_lot().values():
[Previous line repeated 926 more times]
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 197, in _find_delivery_ids_by_lot
move_lines = self.env['stock.move.line'].search(domain)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 1810, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
query = self._where_calc(args)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
return expression.expression(domain, self).query
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
self.parse()
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4683, in _search
self._apply_ir_rules(query, 'read')
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4464, in _apply_ir_rules
expression.expression(domain, self.sudo(), self._table, query)
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 442, in __init__
self.parse()
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 701, in parse
right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4682, in _search
query = self._where_calc(args)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4438, in _where_calc
return expression.expression(domain, self).query
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 431, in __init__
self._unaccent = get_unaccent_wrapper(model._cr)
File "/home/odoo/src/odoo/15.0/odoo/osv/expression.py", line 405, in get_unaccent_wrapper
if odoo.registry(cr.dbname).has_unaccent:
File "/home/odoo/src/odoo/15.0/odoo/__init__.py", line 104, in registry
return modules.registry.Registry(database_name)
File "/home/odoo/src/odoo/15.0/odoo/modules/registry.py", line 61, in __new__
return cls.registries[db_name]
File "/home/odoo/src/odoo/15.0/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
RecursionError: maximum recursion depth exceeded
```
closesodoo/odoo#80606
X-original-commit: acceb903b0487987edd5da9ce343c0f6c3ff44d8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit simply re-organizes a few fields on the crm.lead form view to give
more visibility to the most important information and to give more space to the
"Notes" section.
Task-2677144
closesodoo/odoo#80591
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Julien Banken <jbn@odoo.com>
Saved payments methods for disabled acquirers are no longer visible on the customer
portal. It was fustrating for the customer to see saved payment methods that he was
no longer able to use as they are disabled.
Now the use should only be able to see payment methods that he can indeed use.
Task - 2679695
closesodoo/odoo#79253
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The False key is always added in attendance and leave intervals batch
but is not added in the work_intervals batch.
To give a more smooth API, this commit aligns work_intervals behavior
with the two other methods behavior, regarding the added False key.
task-2646630
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#77362
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
In some circumstance, the image cropper is being reverted by the
Odoo editor unbreakable mechanics. The reason was that the cropper tool
was appended inside the editable rather than outside the editable.
Task-2693553
closesodoo/odoo#80613
X-original-commit: c09600fe35089cdaed34ec12d8bcb992d24e043f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Steps to reproduce the bug:
- Install l10n_de
- Create a german company
- Create a SO with two lines with big description
- Print report Sale/Quotation
Bug:
All the elements on the 2nd SO line was aligned with the top
opw:2690117
closesodoo/odoo#80599
X-original-commit: e633715b6e7e2891f367d1ff1e2796f8f1923ee2
Signed-off-by: Florian Gilbert <flg@odoo.com>
When assembling the email we are leaving the assignment of the attachments
to another method that we can inherit and then modify instead of doing it
in the same method to attach them.
The idea is that in any localization we need only to modify that method
in order to add new attachments to the mail template.
closesodoo/odoo#80490
X-original-commit: 6f2e7dc3e8c468bcdb0862468eb08b65ce40c983
Related: odoo/enterprise#22568
Signed-off-by: Laurent Smet <las@openerp.com>
Delete code that is not useful anymore and was introduced in
task-2666881 (PR #78334)
task-2694027
closesodoo/odoo#80051
Related: odoo/upgrade#3050
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This merge commit has five sub-sections:
1. Rename 'slide_type' and 'datas' fields
To 'slide_category' and 'binary_content', in order to ease the following
changes.
See underlying commits for detailed information about those points.
2. Completely refactor the way we handle external content in the course slides.
This includes both technical (new fields, ...) and functional (forms) changes.
With these changes, we aim to make it much clearer for the end user on how to
introduce new content to its course, both for local files and external links.
3. Introduce support for Vimeo
Vimeo is a platform for professionals that manage video content, similarly to
YouTube.
The changes include allowing to introduce Vimeo links in your slides, correctly
embed the video, automatically set it as completed in the last 30 seconds,
fetch video metadata to autocomplete fields when URL is input, ...
4. Slightly improve e-learning views
See underlying commits for detailed information about those points.
5. Rename 'webpage' to 'article'
Indeed, 'webpage' was confusing because it was leading you to believe that you
would have to link external content from another website.
See underlying commits for detailed information about those points.
LINKS
Task-2510174
UPG PR odoo/upgrade#2498closesodoo/odoo#71477
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit simply renames the 'webpage' slide_category into 'article'.
Indeed, 'webpage' was confusing because it was leading you to believe that you
would have to link external content from another website.
While this slide_category instead lets you build an 'article' with content by
using our website builder.
The changes here are just renaming the slide_category and the labels, there
should not be any functional change.
Task-2510174
Part-of: odoo/odoo#71477
PURPOSE
This commit adds some small UI improvements to the e-learning views.
All those small changes are meant to improve the general user experience when
adding content to a course.
DETAILED SPECS
- Change some placeholders / labels
- Inform the end-user that he can edit his 'webpage' slide using the editor
- Inform the end-user that he can add questions to his 'quiz' slide using the
'Quiz' tab in the backend form view
- Do not update from slide metadata if field value is already set
- Do not allow previews for certifications
- "Allow Download" of slide content is now False by default
As it was nice to have for "Documentation" courses but does not really make
sense for "Training" ones.
- Having a duplicate video id is now informative on the frontend and not
blocking as before (it was allowed in the backend form anyway).
- Show the video title in the frontend preview
Task-2510174
Part-of: odoo/odoo#71477
This commit adds support for the Vimeo provider in the e-learning platform.
This includes managing Vimeo video links and showing the Vimeo embedded player
in the fullscreen and non-fullscreen viewers.
But also managing video events to:
- automatically set the slide as completed when the video reaches the last 30
seconds
- go to the next slide when the video ends (if there is one)
Task-2510174
Part-of: odoo/odoo#71477
PURPOSE
Globally refactor the way we handle external content (YouTube videos,
Google Drive documents, ...) in the course slides.
This includes both technical changes (new computed fields, rename, ...) as well
as visual changes on the form views that allow introducing new content, both in
the backend (slide.slide form view) and in the frontend (course main website
page).
SPECS
TECHNICAL REFACTOR
1. Rework the "url" field
This field was used without any distinction for videos, regular documents and
images, leading to a big confusion both technically and visually.
The urls are now split in separate fields (video_url, document_google_url and
image_google_url), based on the type of slide.
Those fields are implemented as 'related' to the stored 'url' field to avoid
extra storage.
This change globally increases the readability and usability in the code, and
also allows for clear labels on the various views.
1b. Rework the "binary_content" field
The same way as for the 'url' field, the 'binary_content' field has been split
into 2 related fields ('document_binary_content' and 'image_binary_content').
This allows for more readability and also helps in the form view to limit the
file selection to the supported file types.
2. Remove the "document_id" stored field
This field did not have to be stored since it can "easily" be inferred from the
video/document URL with some regex work.
3. Remove the "mime_type" field
This field's value was only determined by an external call to the Google Drive
API. It was inconsistent because not set for manually uploaded document and was
used for some strange checks that seemed to work but did not make much sense.
(e.g: used to make the difference between a Google Drive video and a YouTube
video??).
It has been replaced by a "document_type" field, which is always 'pdf' for
local files (only type we support) and inferred from the mimeType returned by
Google Drive metadata for external documents.
This allows, for instance, to show pretty icons next to every slide based on
their type, "sheet" files (Excel, Google Sheet, ...) share the same icons, the
same principle is applied to "doc" files (Word, OpenOffice, Google Doc, ...)
and finally "slides" files (PowerPoint, Google Slides, ...).
4. Introduce several computed fields
Such as:
- video_source_type
- youtube_id
- google_drive_id
These fields are mostly inferred from the slide type and the related URL.
They are used to make clear checks in the code and ease readability, for
example when constructing the slide "embed code" to insert it in the frontend
full screen viewer.
5. Remove the "presentation" slide_type
The slide type "presentation" was some kind of very confusing type between
image and pdf. It was mostly relying on the fact that the content had a bigger
width than height ('landscape' display).
This lead to a lot of confusion both in the code base and in the various forms
allowing to introduce new content ("what should I choose? document or
presentation?").
In order to simplify everything, we completely removed the slide type
"presentation" and converted all the data that had this type and the various
code checks to the type "document" instead.
Meaning that we end up with the following slide types:
- Infographic - for images, local files + external links
- Web Page - local input only
- Document local files + external links
- Video - external only, YouTube or Google Drive links
- Quiz
FUNCTIONAL
Following the technical changes here above, we can improve the form view of the
slide.slide model as well as the website form that allows adding new content.
1. Slide form view
To make it clear where the source of the document comes from, we introduced a
"source_type" field that is either "local_file", used when uploading a file
from your computer, or "external", used when linking content from Google Drive.
The source_type selection appears when adding content of type "document" or
"infographic" and conditions the display of the file upload button or the
document_url field.
2. Adding content from the website
When adding content from the website, the user is now invited to select from
ALL the available slide type, meaning we added "Infographic" to the selection.
Before this change, if you wanted to link an image, you had to select the type
"presentation" (that has a PDF file as icon...) and then input an image file.
The JS then processed the file type to determine the slide type.
As this was slightly confusing for the end user, we decided to use the same
approach as the form view, meaning you FIRST select the type of slide you want
and THEN input the content as a local file or external link.
Since we now handle all types of documents when using an external Google Drive
link, the various screen and text helpers have been reworked accordingly.
3. Handle more types of slides with the new "slide_type" field
This commit also introduces a new "slide_type" field.
(Don't get confused, the previous "slide_type" field has been renamed to
"slide_category" in an earlier rename commit).
This slide_type is a refined slide_category:
- Videos are split into 'youtube_video' and 'google_drive_video'
- Documents are refined based on the file mime_type if it's external content
For example, if you link a Excel file, the slide_type will be 'sheet'.
If you link a Google Doc, the slide_type will be 'doc'
etc...
(Local documents are only PDFs since it's the only type we support for now)
This small change allows to include minor nice details into views, such as a
refined icon for each slide_type on the website.
LINKS
Task-2510174
UPG PR odoo/upgrade#2498
Part-of: odoo/odoo#71477
This commit simply applies the following renames in the slide.slide model:
- 'datas' is renamed into 'binary_content'
- 'slide_type' is renamed into 'slide_category'
This changes intend to ease the next bug refactoring of the website_slide
module content management.
There should be no functional changes applied in this commit.
Task-2510174
Part-of: odoo/odoo#71477
commit af13e76629
reworked delivery split to add interwarehouse addresses but also
removed the address in a usual case.
opw-2701998
closesodoo/odoo#80609
X-original-commit: 9b9c4a3433d2a052e70e434b11817b791f38e508
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Current behavior :
When installing l10n_de_pos_cert on runbot module you couldn't start a PoS session
Steps to reproduce :
Duplicate runbot database
Install l10n_de_pos_cert
Try to start a PoS session in a german store
opw-2691615
closesodoo/odoo#80608
X-original-commit: 467708cbedfb2b8146c653afc06625dc4af7e893
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Clean the code for onchange method with putaway rule applied, merge
them into one onchange method.
Task-2614519
closesodoo/odoo#80519
X-original-commit: 5f562895c4d2f9beac7e0458fcee493b0141f1af
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
When applying putaway rules, the qty of all existing assigned SM lines are
summed to calculate the incoming qty of the product to determine if the
capacity has been or will be met. When a SM - that a putaway rule will apply
to - is created, then it will have its SM lines included in this calculation when
it shouldn't. In this case, we need to ignore the qty of those lines
Task-2614519
X-original-commit: 14738c7e5ecfba81e7ccbd401e1204d3bac960aa
Part-of: odoo/odoo#80519
Now when apply putaway rule on a package with package type, we calculate
the weight of the package according to the product in that package
instead of using the max weight of the package type.
Task-2614519
X-original-commit: 0281ebec36dbb9effd3d2913c0d38c88f9f19920
Part-of: odoo/odoo#80519
Package won't have a company_id untill the move is validated.
Previously, the package_type_id on package has the check_company to be
true. This forbiden any package type with company_id to be used on a not
validated package. In this commit, we remove check_company to avoid
this.
Task-2614519
X-original-commit: 66cbccb15368713ef04d2ba0f9e8808b72557b41
Part-of: odoo/odoo#80519
Previously when apply putaway rule, we only count the packages in the
location to check if there is enough space the incoming package. Now we
also count all other assigned incoming packages to that location to
avoid overflow.
Task-2614519
X-original-commit: 21373dbc507e57c3a19b415583a5b0595a66c1a3
Part-of: odoo/odoo#80519
When apply a putaway rule to find a putaway location, we only pass the
product and/or package info to _get_putaway_location. This is not
enough since the putaway rule can also be applied to packaging.
X-original-commit: 9f339938aec075c5385dca349dfc6a7c2d43b6ad
Part-of: odoo/odoo#80519
Put in Pack won't trigger any onchange to use putaway rules. In this
commit, we apply putaway rule in Put in Pack when only one move line
is put in pack. We also check if the ml to put in pack are all in same
package type, if so, we set that package type on the package.
Task-2614519
X-original-commit: 023b69ac2ccac2456bcb1a8b1b66b468e213b86a
Part-of: odoo/odoo#80519
We didn't show company_id on package type view, there was no way to
change it. Add it in this commit.
Also made company_id on stock_storage_category form not visible when not
in multi-company.
X-original-commit: 61792e9dc13bf9d326e69eb59efe3a22354f1ca5
Part-of: odoo/odoo#80519
When find putaway location while creating new sml, we didn't consider
the package. Add it back.
Task-2614519
X-original-commit: fcbd4c775248f18c71f9cb0e700ed9934babcdfd
Part-of: odoo/odoo#80519
Previously when the onchange method find a putaway location for a sml, we
find a putaway location of the location_dest on the sml. However, the
location may already be a result of last computation of putaway
location. In this commit, we always find putaway location of the default
destination location.
Task-2614519
X-original-commit: a96fb8e9d2a57b67666ca3b29c9313aba83cdb91
Part-of: odoo/odoo#80519
Until now, stored compute fields were computed after database insertion.
This meant that required fields should not be computed, for instance,
unless some hackish code was added to make it work. Another trick was
to provide some default value, but this actually prevents the field for
being computed after insertion.
This commit provides a field parameter to specify that the field should
be precomputed: adding precompute=True on the field definition force the
method create() to compute its value before inserting the new record in
the database. For the reason explained below, precomputing fields is
not always correct, and therefore the default remains to not precompute
a field.
Some stored fields must be computed after insertion, for instance:
* statistics fields computed with search/read_group/...
* fields referencing the current record (res.partner.commercial_partner_id)
* fields referencing another record that does not exist yet (think about
records created by one2many fields)
* fields depending on the create_date/write_date/create_uid/write_uid
Those fields shouldn't be defined with precompute=True, which triggers
their computation post record creation. This is why, by safety, we
consider the default behavior to be precompute=False.
closesodoo/odoo#80449
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
Purpose of the commit is to improve the generic UX of task
and project views.
task-2590412
closesodoo/odoo#75509
Related: odoo/enterprise#20423
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Current behavior:
When you try to close the PoS session when there are more than 6 payement methods the footer buttons dissapear
Steps to reproduce:
Add atleast 6 payement methods to any PoS. When you try to close a session of this PoS the footer buttons are out of the popup
opw-2667725
closesodoo/odoo#80607
X-original-commit: 0ae2b65644451efaf77e8bfd2f704055366dff2a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>