Before this commit
==================
before this commit, it will raise the error when submitting EDI
because the tax report line does not exist and it will be removed
from this PR #99401
After this commit
=================
no error will be raised and it will get related tag_ids
closesodoo/odoo#101988
X-original-commit: 9a60822ae9227d7fa815b06cb0a26629ec075e1e
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit applies the proper spacing between FormView's buttons in a
Dialog's footer.
Steps to reproduce:
- Open Notes
- Enable debug mode
- In Debug menu, open "Edit View: List"
=> dialog's buttons have no spacing
closesodoo/odoo#101974
X-original-commit: f67a8fff6c86a67ce2f6a162f1de992fe25eefbd
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
correctly used
When a boolean ir.config.parameter is set to False,
self.env['ir.config_parameter'].sudo().get_param('parzm_key') will return
'False'. As the string is not falsy, the parameter value match as true.
This commit fix the behavior for the sale.automatic_invoice to keep coherence
with the subscription module
closesodoo/odoo#101906
X-original-commit: ade1a1f5ee00baa88347bfd151f028bd17d7f4f1
Related: odoo/enterprise#32173
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
With the `always edit` changes, the edit button was removed. Thus, these
steps were failing and became useless anyway
closesodoo/odoo#101887
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
auth="none" pages don't have self.env.user filled in, this throws a
traceback if you try to get the current cart.
This causes an issue when we try to fetch the cart quantity on the login
page.
closesodoo/odoo#102010
X-original-commit: d1c053158f1d306df1f5f1e9d4c81ee642a73f48
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This test is failling during nightly mainly when executed arround 23
The most likely reason for that is because of the freezetime rounding
the day and creating an error between 23 and 00.
The freezetime only wraps the create but the compute will be triggered
only after that. Adding all assertions inside the freezetime may be
enough to fix this issue.
closesodoo/odoo#101989
X-original-commit: 98693d5543e3c0b4f8f51a05e026fce8ddb77a51
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Add a new method `_get_move_applicability` allowing to trigger the EDI on any journal entry, using the custom functions you want.
closesodoo/odoo#101985
X-original-commit: 0e5626ca5126e6fea7fb95b694229948540764d7
Related: odoo/enterprise#32212
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Allow our users to modify mail template more easily
- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage
In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.
Update master data to add description on some templates.
task-2944770
closesodoo/odoo#101730
X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Changes the background color of the digest to follow the
company color theme the same way it has been done for
the email layout.
task-2944770
X-original-commit: 1e9db93967ee76e21dd95e7500339d1de6914fbd
Part-of: odoo/odoo#101730
Update dashboard to latest version
closesodoo/odoo#102006
X-original-commit: 4d6fb4549d4069fc52af0ba500f91ba271e9c62b
Related: odoo/enterprise#32222
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
feffe7d removed the id from the chart object at export, but this id was
used to validate the dashboard data in the test. Take the figure id
insread in the tests.
X-original-commit: 3788df2fe6e3c0b62df604a1aae89b3d81c324d4
Part-of: odoo/odoo#102006
If you create stress days, the default work calendar is set to be
the company's default calendar, therefore exclude by default
every employee with a different work calendar. Since the field
is by default hidden, it is misleading, so by default no calendar
should be set.
task-2999197
closesodoo/odoo#101986
X-original-commit: 911832980786cc10bb79c7b36b2142d063917bff
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The new lines should contain the current balance, and the account of the
last 2 lines if it is the same.
* The computation of the balance was reading on `debit` and `credit`,
leading to a cycle in the compute method. It is useless to try to read
those fields because of `_inverse_debit_credit`
* The computation of the account was simply forgotten during the
refactoring
Also move a constraint from `write` in a more rigorous `api.constrains`,
which revealed a bug for to find the account of payment terms of receipts.
Followup of d8d47f9ff8
task-2956509
closesodoo/odoo#101994
X-original-commit: f04f83b42bb1fbcacbb6bf92a2156ff2be1bf1b1
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
When using complex sub-totals, the total sum of taxes was always removed
from the total amount.
________________________________________________________________________
This also allows more flexibility for ordering tax groups.
Before cd6c33575b, it was possible to have this:
* Tax Exempt 2% (preceeding subtotal "Discounted")
* VAT 21% (no preceeding subtotal, take default)
* Reapply 2% (preceeding subtotal "Reapply")
The value for groups without preceeding subtotals was always 0 and
* before the commit mentionned above, it was possible to reach 0 too for
the groups with a preceeding subtotal
* but after +1 was added making it impossible from the view
We now always take the group's order (or the smallest one for groups
without a preceeding subtotal)
Followup on d8d47f9ff8
task-2956509
X-original-commit: d3471336b85f17fe274acf6a01b71c5d1483e94a
Part-of: odoo/odoo#101994
The display_type is always filled now, valid values for non display-only
purpose are `product`, `payment_term`, `tax` or `cogs`
Follwup on d8d47f9ff8
task-2956509
X-original-commit: 7528c07d0f1ea6c4c8872ec66a5609b264300908
Part-of: odoo/odoo#101994
Since it was introduced with [1], only the key could be added in the
settings, but not the app id.
Still, both are needed to actually use unsplash, otherwise it won't
work and the media dialog will keep showing the crendentials part, where
one can also add its credentials.
Basically, without the app id field, the access key field was useless in
the settings.
[1]: https://github.com/odoo/enterprise/commit/88746157ca16af4033576361dddae0b694aca70d
task-3004144
closesodoo/odoo#102000
X-original-commit: fa45712eecd2a0fbf6236f611ddffd0b5e81dc31
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In some place the search params are mandatory in the route.
We now add the search and hash params to the editedObjectPath to
avoid having an error when trying to go back.
task-2993826
closesodoo/odoo#101996
X-original-commit: 2bed20392084bcbec2683939e5659b03e3ea7acf
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
*: website_blog, website_forum, website_hr_recruitment, website_sale,
website_slides
The goal of this commit is to set the missing 'view_ids' on some
actions linked to website 'pages' tree/kanban views.
Linking a form view to actions will make the 'Edit' & 'Configuration'
buttons work correctly (on kanban record dropdown for 'hr.job' &
'slide.channel').
The website url on "product pages" kanban should start on a new line
after this commit too.
Related to task-2889981
closesodoo/odoo#101814
X-original-commit: a61e730cd9f92b2c343646f33f3e59cef518c3bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website_hr_recruitment
After [1], the multi-edit was added on the pages list views not using it
except 'hr.job' records since editing the 'Department' field leads to a
traceback.
The goal of this commit is to fix this issue by setting an invisible
'company_id' (to be available in domains since necessary to change
'Department') and add multi-edit on the view.
The 'home' icon for 'home page' records on list view should be hidden
after this commit (on multi edit mode) to edit the fields correctly.
[1]: https://github.com/odoo/odoo/commit/be58687284884550cc4e6c2ac7255abee4eb1125
Related to task-2889981
X-original-commit: d101be46a2a9c392e2d63f491fcc5ccec2d65c78
Part-of: odoo/odoo#101814
Purpose:
--------
When opening one of the sample surveys, the name of the survey was not
displayed entirely, and deleting the sample survey didn't do anything.
Specs:
------
Removed "target" parameter of the show sample action which was set to
"main", which clears the breadcrumbs. Since the breadcrumbs were cleared,
when opening a sample, one could not go back to the kanban view and was
stuck in the form view when deleting the sample.
Also removed the "form_view_initial_mode" which was set to "edit", which
is not required anymore since the introduction of the always edit mode.
Task-3004137
closesodoo/odoo#101976
X-original-commit: 519cabbe0202c94027e044dd1b598f1539320e27
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
During tests, when matching ir.mail_server has `smtp_encryption` set to
`starttls`, connect() will crash with an AttributeError as follows:
2022-09-22 07:04:27,882 20445 ERROR tests-150-starttls odoo.addons.base.tests.test_ir_mail_server: ERROR: TestIrMailServer.test_mail_server_send_email
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/tools/misc.py", line 804, in deco
return func(*args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/addons/base/tests/test_ir_mail_server.py", line 261, in test_mail_server_send_email
IrMailServer.send_email(message, mail_server_id=self.server_domain.id)
File "/home/odoo/src/odoo/15.0/odoo/addons/base/models/ir_mail_server.py", line 575, in send_email
smtp = self.connect(
File "/usr/lib/python3.8/unittest/mock.py", line 1081, in __call__
return self._mock_call(*args, **kwargs)
File "/usr/lib/python3.8/unittest/mock.py", line 1085, in _mock_call
return self._execute_mock_call(*args, **kwargs)
File "/usr/lib/python3.8/unittest/mock.py", line 1146, in _execute_mock_call
result = effect(*args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/addons/base/models/ir_mail_server.py", line 313, in connect
connection.starttls(context=ssl_context)
AttributeError: 'TestingSMTPSession' object has no attribute 'starttls'
This commit adds a dummy `starttls()` method to `TestingSMTPSession` to
gracefully handle such case.
closesodoo/odoo#101962
X-original-commit: ec156901dd4db2fc7a2827b1eb78515f6259699e
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
Since the bank statements have been removed, we don't have anymore a
stat button to show the bank statement.
So we re)introduce a button that display the statement lines.
caused by: https://github.com/odoo/odoo/pull/99092closesodoo/odoo#101929
X-original-commit: dd21c708cc08d484530bc7c8433ebbb79f59323a
Signed-off-by: Masereel Pierre <pim@odoo.com>
Have a list view with more records that can be displayed with the current
limit. Go to next page and group by some field that produces fewer groups
that the current offset. Before this commit, no group is shown because
the offset is kept when the list reload. The same thing can happen when
the domain is changed.
We fix that bug by setting the offset to be zero when the list reload.
closesodoo/odoo#101975
X-original-commit: bda0bd21c8e6772cbfb0680a2b8b497dbbcfd628
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Before this commit, the WebsitePreview document title was not completely
replaced with the iframe's one: it was still prefixed by 'Odoo - ' by
the title service.
Now, the WebsitePreview, introduced in [1], is adapted to remove the
'zopenerp' part when replacing the title (and adding it again when
unmounted). While doing this, the backend's favicon is also changed with
the frontend's one, to be consistent with displaying the frontend
document title only.
This commit also adds an effect on the Optimize SEO dialog, so that the
document title matches the user's input.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#101972
X-original-commit: 52ec7d1279144b9cd38f8444648b8246df694b9c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Younn Olivier (yol) <yol@odoo.com>
Before this commit, for the following flow:
- Add arabic language (or any other rtl language),
- On one of the websites, set it as the only website's language,
- Reload and go to the client action,
=> The frontend is correctly displayed in rtl,
- Click on edit,
=> The frontend, in the iframe, is reverted to ltr,
The WysiwygAdapter, introduced in [1], was not passing the correct
direction option to the OdooEditor, which would revert the editable to
the default 'ltr' direction.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
X-original-commit: 2f463ca65b149122c85a04b20b4f82e0be479fc8
Part-of: odoo/odoo#101972
Before this commit, the Editor Menu was confusing when opened for a
translatable website: it would list the menus in the user's language,
not in the displayed website's language.
First, this commit shows that menu only for websites in their default
language, as the user should edit his website structure in the default
language.
Secondly, the 'get_tree' and 'save' requests on the website menus are
done with the website's language, not the user's language.
This commit also fixes a bug introduced with [1]: the website override
of the start method of the SnippetsMenu was incorrectly done.
In translate mode, it should not activate snippets on clicks, otherwise,
the LinkPopover was instantiated when clicking on navbar menus, allowing
to edit the menus from the translate mode, and breaking it.
[1]: https://github.com/odoo/odoo/commit/df1869153a90898bad3e0b61e5fc43a9ed3d59c9
task-2687506
X-original-commit: 4266966a9b0fa452b5991d9bea0fe914aca85f4d
Part-of: odoo/odoo#101972
`hr_timesheet`, and other timesheet related modules,
overrides `_get_view` to change some timesheet time field label
from "Hours" to "Days" according if the company uses hours as
timesheet encoding UOM or days.
Since odoo/odoo#99417, and the fact back-end views are cached,
keys on which the model views depends on for the cache must be added
through an override of the method `_get_view_cache_key`.
Without this revision, if a database has
one company using hours as timesheet encoding uom,
and a second company using days as timesheet encoding uom,
the label for one of the two company could be wrong according
to which user/company accessed first the view,
for which company the view has been put in the cache first.
These overrides of `_get_view` should be replaced by another mechanism,
for instance by a Javascript widget,
as this mechanism doesn't really make sense when browsing
multiple companies at a time
(selecting multiple companies in the companies dropdown menu).
When going from one record to another with the left/right arrows,
the company can depend from one record to another,
and therefore the label should change from one record to another
according to its company, which is not the case with the current
implementation.
It could also be achieved by setting two different labels,
with an invisible attrs based on a related field
of company.timesheet_encode_uom_id.
However, as we are close to release, and 16.0 is already frozen,
no unstable changes should be done,
hence I restore the behavior which was there
before odoo/odoo#99417.
closesodoo/odoo#101964
X-original-commit: b2a9868b4a0db5a091a1faae38b7d4de29dfd2f4
Related: odoo/enterprise#32198
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
In the list view of bank statement, when we group by statement or date
or journal, we would like to be able to see the latest running balance
in the groupby line.
That way we can easily see the "ending balance" of each statement which
is a huge help for the accountant
closesodoo/odoo#101812
X-original-commit: 002709b75cf3516a7cdc1c2412afa02f40043abf
Related: odoo/enterprise#32127
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Steps to reproduce:
- have a project with a stage having the user_id set to Mitchell Admin (in this scenario you would have to add the field in the view)
- create a task in this stage
- log in with Marc Demo
- Try to open the project
Issue:
There will be an access error
Cause:
The domain allows to fetch all tasks from a project; even those from a prohibited stage
Solution:
- As in d4252825f5, we'll restrict the domain and "hide task stages if user is set".
- Prevent the user to create/modify a record to it with with a `user_id` and `project_ids`
opw-2917631
closesodoo/odoo#101965
X-original-commit: fdaef9276b89e2170128e205a4b7fd0b8defc2b1
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
Before this commit, printing an invoice which is not
created yet reloaded the view with a new record.
Now, the view reloads with the current record.
closesodoo/odoo#101947
X-original-commit: 0bad6ae4185d9b25684d0c47c9cee7c098053707
Related: odoo/enterprise#32191
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This [first commit] removes the addition and removal of classes on the
color picker preview. So far so good, then this [other commit] puts back
the class addition but forgets the removal so the preview of the color
picker widget kept the old values when they were `bg-*` which could lead
to a bad preview of the selected color. This commit fixes that by
removing the old values when a new value is set.
Steps to reproduce the bug fixed by this commit:
- Go to the website app
- Edit a page
- Drop a Picture block
- Change the background color of the block to bg-black for example
- Change again the background color of the block to a custom color
=> The preview of the custom color is not correct, it is still black.
[first commit]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
[other commit]: https://github.com/odoo/odoo/commit/a396f791da94d064d58cce15892e74f45d29b7b7
task-2904507
closesodoo/odoo#101828
X-original-commit: 6da33797798e6112e0dd74a4093f296b6e1b2466
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit fixes 2 issues with the position of the dropdown with the
suggested links in the url picker input of the snippet options. (e.g.
redirect url input of the countdown snippet) and the one for the input
of the link editor.
1- Before this commit the dropdown went over the input while editing the
url.
2- Before this commit the position of the dropdown (when above the
input) was a little too low if there were images in the dropdown. It was
because the images are loaded after the positioning of the dropdown and
no height was defined for these images.
task-2900529
closesodoo/odoo#101815
X-original-commit: 774a42ff18651a20b09a5e34222665216b19c8ec
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Set the default value for create_employee to False.
When coming from employee form, hide the create_employee field.
task - 2990426
closesodoo/odoo#100661
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose: Enhance the profile picture of
* Mitchell Admin and Marc Demo as they
are now sometimes shown in larger sizes (as in appointment).
* Joel Willis, whose picture is used on his eLearning profile
Task-2992949
closesodoo/odoo#101945
X-original-commit: d0e1360e63efca56c06fad82780ab6a96fb6f0eb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Reproduction:
1. Install eCommerce and accounting
2. Go to Accounting->Configuration->Taxes, add one sale tax 15%, and one
0%. Both taxes are included in the price.
3. Go to Configuration-> Fiscal Position, create a new one “test” which
applies the tax mapping from 15% sale tax to the 0%. Check “Detect
Automatically”, set country group as Europe
4. Go to Website->Orders->Customers, set the country of the portal user,
Joel Willis, as Luxembourg. In Sales&Purchase->Fiscal Information set
the fiscal position as “test”
5. Go to Website->Products->Product Variants, create a new one
“test_tax_prod” with price 110, and sale tax 15%, can be sold, can be
purchased and consumable.
6. Go to Website->Configuration->Attribute, create a new product
attribute “test” with Display Type as Ratio, Variant Creation Mode as
Never. Create a value “a” in its attribute values
7. Go to Website->Products->Products, find test_tax_prod, go to its
variant tab, set attribute as “test” with value “a”, publish this
product
8. Open an incognito tab, login as “portal” pwd: portal, search the
product “test_tax_prod”, set the price list as “public price list”, the
price is 95.65 on the page. Add it to the cart, the price is 110
Reason: When we update the order_line, we should update the price based
on the fiscal position for the no_variant products too. However, based
on the current workflow, the price is computed in method
_website_product_id_change before an order line is created. Thus for
no_variant products, the price is not updated.
Fix: This issue is fixed in saas-15.3 by rewriting the workflow and
calculating the price through an on_change function here: https://github.com/odoo/odoo/blob/saas-15.3/addons/sale/models/sale_order_line.py#L588-L605
In v13, we don’t have this on_change method to compute the new price, so
a similar price update can be created in the cart update for
website_sale. This fix solution was created here: https://github.com/odoo/odoo/commit/ea259218196b2d9dc71beffea697025580c6d696
However, new price computation issues can happen when combining two
pricelists, here: https://github.com/odoo/odoo/commit/8d6a2ca0f3dcf8f8cf4679da2b3ce582b7826391
Thus the fix is eventually done in _website_product_id_change. Added a
new parameter to force checking the orderlines based on the domain. The
orderline is created but only can be searched based on the domain. This
ensures the price is computed correctly for pricelists and for tax.
Added fiscal position test for no variant product
opw-2856956
Fix by re-writing in saas-15.3: https://github.com/odoo/odoo/blob/saas-15.3/addons/sale/models/sale_order_line.py#L588-L605
First related fix: https://github.com/odoo/odoo/commit/ea259218196b2d9dc71beffea697025580c6d696
Second fix to patch for the first fix: https://github.com/odoo/odoo/commit/8d6a2ca0f3dcf8f8cf4679da2b3ce582b7826391closesodoo/odoo#101939
X-original-commit: 0ecf2296a8595cf4fb1ba9c5fb7dee876de0a527
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
this commit, remove the margin 0px to add a space between multiple user
avatars.
closesodoo/odoo#101933
X-original-commit: 6512e002263c23cbdffdecf7ee4f031ad7ea4c55
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Currently, the keys passed through the t-foreach for looping over the
groups has a flaw. It comes from a method that works as below:
It checks the group has a value => provide a key as group_key_{value}
if not => group_key_{i} where i is the iteration index
But the {value} is acutally just an id of some model. So in some cases,
with low ids (empty DB, tests, ...), you can run into situations where
the keys are duplicates, making owl crash.
This comit fixes the function to make sure it has no duplicates.
closesodoo/odoo#101925
X-original-commit: aadb38e259c25cea69d54c3c62b21d8e747f9b87
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Model patches are now defined using the `registerPatch` function. This
function takes an object as argument which keys match those of a model
definition.
Benefits:
+ More consistent shape between model definitions and patch definitions
+ No need to import one function to each type of patch
+ No need to repeat the model name for each type of patch
+ No need to import the original definition
Task-2998282.
* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website_livechat, website_slides
closesodoo/odoo#101827
X-original-commit: 7d23491b44b7372209057ea2abc565a95710b316
Related: odoo/enterprise#32136
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
A rule was missing from the copied legacy rules
Note:
`form-break-table` was not only applied for small screen but also for
other case like quick edit in Kanban.
Steps to reproduce:
* Open Project
* Select a project
* Click on the Create button => BUG
closesodoo/odoo#101930
X-original-commit: de78e8bcbbc02be9024a1dd08379306ae56b0a2a
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>