This commit adds a 'guardedCatch' function to the Promise API. This function
has to be used when we don't want to swallow real errors (crashes), like
'catch' does (i.e. basically all the time in Odoo). When the promise has
been rejected because of a real error, the rejected Promises chain bubbles
up to the top and triggers the 'unhandledrejection' event (triggered on
all browsers thanks to the unhandled-rejection-polyfill lib). We then add a
listener on that event to display real errors with the CrashManager.
Part of task 1896658
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
- add residence_country field on hr.applicant
- adapt javascript tour to take into account this new field
- modify hr.applicant form view to integrate this new field
- modify website job apply form template to integrate this new field
Task ID : 1896305
closesodoo/odoo#30458
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- hr.job receives the favorite functionnality.
- Now, a newly created hr.job is favorite by default.
- hr.job receives a new field new_application_count that computes
the number of applications which are new in the flow for that job
(1st step of the recruitment flow).
- hr.job kanban boxes now display the field described just above.
- hr.job kanban boxes are now clickable and thus open related applications in a kanban view.
- Views are modified according to the images given in the related task (see Task ID below).
These changes are details such as modifying strings that are displayed or their position
in the view, or again icons that are displayed.
-> Note : Check related task to see decisions that have been made concerning these images.
- Search on Email on hr.applicant has been separated so that it is clearer.
- Rename old view crm_case_form_view_job into hr_applicant_view_form
Task ID : 1896305
Purpose:
Journal entry can be changed the way we want while the lock date is before then entry date..
Entry : Draft -> Validated (or posted)
Specs:
add a date field in the accounting settings: tax lock date
implement a constraint ensuring that no one can modify the information related to tax on account.move.line prior to this lock date. That means the debit, credit, tax_ids, tax_line_id fields. Other fields can be modified. This also means we cannot create/delete an account.move.line with tax information prior to this lock date.
Task 1914762
closesodoo/odoo#29272
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Issue detected with tests in the branch that replace deferred by native
Promise. Need to add isMedia to detect if the target is already a media
when focus the editor.
This is a manual forwardport of PR odoo/odoo#31632.
closesodoo/odoo#31633
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
- suppress old tax 17.5%
- updated 'Standard rated purchases from EC' from 17.5% to 20% to show correct value in enterprise report under [BOX 2] line
- Added missing tax, 'Lower rate sales (5%)', and also added a saperate tag for it
- improved tax name
was Task: 33297
was PR #22173
For iframes, we need to inject summernote because there are references
to "document" in it. When loading the iframe, if it is canceled, there
is a risk that the library is erased and that it breaks the field html.
We must also slightly modify the library to prevent it from making
changes to the library of the main "window".
commit c914df5a36 introduced procurement
refactoring and a function _make_po_get_domain that is responsible to
forge a domain in order to find an existing PO that could append the
po line created by the procurement. However the function is defined in
stock and overriden in purchase_stock, purchase_requisition_stock,
mrp_mps(oe). All the module depends of purchase_stock and the method
in stock only return an empty tuple. So the method in stock could
be removed and the method in purchase_stock could become the new parent.
closesodoo/odoo#31580
Signed-off-by: "Simon Lejeune (sle)" <sle@openerp.com>
commit 9764f04a3c introduced a kwarg on
picking and stock move in order to check if the validation should run a
backorder creation or not. However the validation of stock move line is
a level lower and the concept of backorder does not exist at this level.
So the kwarg in action_done is an error and should be removed.
`this._id` is overriden by the crosstab_bus, so the event handlers
weren't unbound at destroy.
Manual forwardport of odoo/odoo#31578, as we need this for another
branch, in which it makes tests fail.
closesodoo/odoo#31579
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Revert the commit in which we added l10n_be as dependency of l10n_be_hr_payroll
Move the demo data into a specific test module, to avoid crashes when installing
the module, that create payslips on the Belgian company, the auto install l10n_us
that tries to unlink the journals and the accounts.
closesodoo/odoo#31375
Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
The package creation was done even before the call of the 'choose.delivery.package' wizard, so the 'Discard' button of the wizard was useless.
This commit fix this behaviour by creating the package only when the "put_in_pack" action is called from the wizard.
The default weight is thus no more based on the default package but on the picking related to the package.
The method 'manage_package', 'default_stock_quant_package_id', 'self._default_delivery_packaging_id' were removed since they are no more relevant.
The method 'check_destinations' was refactored to '_pre_put_in_pack_hook' to avoid confusion related to its misleading name
TaskID: 1924875
closesodoo/odoo#30324
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
accounts mapping of fiscal positions should work on the PoS as it works
in Sales
Description of the issue/feature this PR addresses:
Setup a fiscal position with account mapping for income account and
receivable account
Make a pos_order with the fiscal position
Current behavior before PR:
When pos is closed, account mapping is not done and the
account_move does not take the mapped income account nor
receivable account
Desired behavior after PR is merged:
The account_move should take the mapped income account
and receivable account
task:
https://www.odoo.com/web#id=1916865&action=333&active_id=1428&model=project.task&view_type=form&menu_id=4720closesodoo/odoo#29433
Purpose
=======
Access group terminology is missleading. Yous have to be manager to administrate
an application. This task consists to rename groups to be understandable for everyone.
Groups should be reorganised on the users form to be more explicit.
Specification
=============
1/ Rename 'Manager' to 'Administrator' in users groups.
2/ Define a hierarchy on access groups by using the category_id in the manifests
A category 'Operations/Project' will create a category Project with a parent
category 'Operations', and something smart is already developed (in modules/db.py)
to avoid duplicating categories.
3/ Add a group in expenses to be able to approve expenses reports for my team.
4/ Add a group in timesheets to be able to approve timesheets for my team.
5/ Remove partially the useless crap in ir_module_category_data.xml
6/ Sort access rights groups on users form according to its parent category
closesodoo/odoo#29362
Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
Log a next activity on the PoS.Session if open since more than a week
(responsible = pos user)
"Your PoS Session is open since xx/xx/xx, we advise you to close it and
to create a new one."
closesodoo/odoo#29234
The model reordering rules (stock.warehous.orderpoint) has two fields
waherouse_id and location_id. This commit will restrict the domain on
location_id depending on the warehouse set. The user can now choose only
locations child of the warehouse view location or location with no warehouse parent.
Task : 1933828
closesodoo/odoo#30760
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Add a new group in the settings page, allowing to put some others
settings on the right side of the page (needed in enterprise).
Task-1942377 Closes#31212
Before this fix, the customize button was updated with each character,
which slowed down the fast insertion of characters and used resources
unnecessarily.
since the fix of the forward-port has missed checking the chart template
too
https://github.com/odoo/odoo/commit/2bba89c4ad5d393a15e02f0b7435ea7c63935bb0
Check the chart template is required because company could have a chart
template and any record at ['account.move.line', 'account.invoice',
'account.payment', 'account.bank.statement'] models
closesodoo/odoo#31218
Before this commit:
If a view A was doing a t-call on a view B and view B had view C as child.
And view A had view D as child.
And view D also t-call view B (that as mentionned above has view C as child).
And view D was inactive.
Then COWing C to set it as inactive would make `get_related_views()` on A to
return both generic active C and COW inactive C.
This rare case appeared for customize option that were enabled by default, like
wishlist, compare..
Disabling this customize option would show both the generic customize view and
the COW customize view.
Resulting in the customize toggle being shown twice, one enabled and one
disabled.
Detailed explanation:
1. `website_sale.products` would call `_views_get()` with `options=True` for its
t-call node `website_sale.products_item`, returning the full view tree,
including COW wishlist.
2. `website_sale.products` would then call `_views_get()` on its child views
with `options=extension.active`.
It is the case for `website_sale.products_list_view`, which also has a
t-call node `website_sale.products_item`.
It would then perform the same `views_get()` as in step 1. but with
`options` set to the view active state, in this case False.
At that point, the `_view_get_inherited_children` method would filter by
active before filter_duplicate, leaving the generic view over the specific
one as it should.
closesodoo/odoo#31286
When creating a new customer, the selection list for the state is empty
unless the country is filled in.
This is an issue since users usually fill the address fields in the
sequential order: street, city, state, zip and then country. Since no
state proposal is displayed, users tend to create a new state.
Introduced in 5fcf891e07.
opw-1941579
closesodoo/odoo#31273
When a picking is linked to a sale order, it is not displayed anymore
ont the user portal.
This comes from a fix in rev: https://github.com/odoo/odoo/commit/7825d008279702b3a5017196aa0345a0e48810c9
that hides the shipping_adress div, which is the one targeted by the
xpath for shoing picking. To fix this behavior, we changed the xpath.
TASK-ID: 1939813
closesodoo/odoo#31267
On the quote builder, we have a description per product that is either:
- the description of the product on the quotation template
- the quote_description of the product
and if it is empty we can edit it on the quote builder.
But if we have several of them, we only see several empty editing blocks
without knowing which product it refers to: thus if we removed the line
it could have adverse effects by removing something not related.
With this change, there is an alert when editing that explain each
line description being.
opw-1943009
closes#31263
To edit a view on the website, we use the branding mechanism.
This mechanism adds informations to node which can be edited about how
or where the change should be saved, for example:
```
<template id="a">
<div><b>hello</b></div>
</template>
```
might be rendered to someone that can edit it:
`<div data-oe-model="ir.ui.view" data-oe-id="5" data-oe-field="arch"
data-oe-xpath="/div[1]"><b>hello</b></div>`
when something is changed: we will send the modified content, the view
id (eg. 5 for view `a`) and the xpath in this view of what is replaced.
If a view is overridden, there is mechanism to distribute the branding
to children, for example:
```
<template id="b">
<div>
<b>hello</b>
<div>
</template>
<template inherit_id="b">
<div position="inside">
<b>world</b>
</div>
</template>
```
The branding can't be on the parent div that will contain other content,
because the other content is in another template and should not be saved
in template `b`, so this would be rendered like this:
`<div><b data-oe-model="ir.ui.view" data-oe-id="6" data-oe-field="arch"
data-oe-xpath="/div[1]/b[1]">hello</b><b data-oe-model="ir.ui.view"
data-oe-id="7" data-oe-field="arch" data-oe-xpath="/div[1]/b[1]"><b>
world</b></div>`
This changeset fixes two issues:
- if we have a primary inheriting view: the xpath are wrong in the
primary inheriting view part, they are computed on the view applied on
its inherit_id; the part of the inherit_id view have the primary
inheriting view ID instead of inherit_id view id.
- if we have `<div t-call="..."/>` in a view, the branding of view
should be distributed to children and not affect t-call part: this was
done for `<t t-call="..."/>` but not for `<anyothertag t-call/>`.
The added test failed on all assertions before the change:
- "test_branding_primary_inherit" would not distributed
- "test_call_no_branding" would distribute branding on `t-call`
opw-1937757
closes#31039
The Actions/Print dropdowns may overflow the screen in case of very long
lists of menu entries, when based solely on the default BS4 styles for
`dropdown-menu`.
The `o_dropdown_menu` class forces a vertical limit and a scrollbar when
this happens, and should be applied to those control-panel dropdowns to
prevent this UI glitch.
See also 1c1c0897e8 which adapted
dropdowns to BS4.
closesodoo/odoo#31251