IdentifyingFields and fields marked `required` must have their inverse
with `isCausal: true`. This led to having to systematically declare
inverses on the related models in order to explicitly add `isCausal:
true` to them, even when these inverses are not used for anything else.
This commit automatically adds `isCausal: true` to the inverses
generated by the framework when they are related to required fields or
identifyingFields. Thus, it is no longer necessary to declare inverses
if they are not used for anything else.
This commit also removes all the inverses that are no longer needed
thanks to this change.
closesodoo/odoo#81679
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When a user double clicks on a record in the kanban view of the form view of project a crash occurs.
This happens because there is an init which is called twice and during the second time the component created during the first click is destroyed and a DOM_updated event is still trigger which leads to a crash because in the case of project_form there is has a use of the element's dom which is then no longer available.
There is the same case in "FieldHtmlWithAction" and in "MassMailingFullWidthFormController"
The problem can be easily fixed by using on_attached_callback and on_detach_callback instead of setting a listener on DOM_updated in the init method.
opw-2685867
closesodoo/odoo#81680
X-original-commit: 8d83433d463dd3d1aef321921939962883f57d68
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
Current behavior:
When a user doesn't have any HR access right he cannot access his own profile
Steps to reproduce:
-Go to the demo user settings
-Remove all the right in the HR section
-Log into demo account
-Try to access My Profile
opw-2712593
closesodoo/odoo#81674
X-original-commit: ee932eab329043a3ddf82bb39dff458f4eb7f7ad
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Step to reproduce:
Try to print traceability report
Current Behaviour:
Traceback wrongly generated header
Behaviour after PR:
No Traceback, the header is now correctly generated
opw-2704299
closesodoo/odoo#81673
X-original-commit: 6b567326edc7bc691d87d911759ee30a24a8a1d7
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
Before this commit, it was possible to drag and drop a popup inside an
oe_structure which was itself inside an other oe_structure (e.g. snippet
parallax). It didn't make sense and moreover created bugs.
After this commit, it is no longer possible to drag and drop the popup
snippet or the newsletter popup snippet in a substructure.
task-2491976
closesodoo/odoo#81669
X-original-commit: 49050c124795852ce7ad51b92958498972730dcf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
The tags management on an employee was limited to HR Administrator,
which didn't make sense as an HR Officer could manage the tags just not
assign them to an employee.
closesodoo/odoo#81654
Taskid: 2715498
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When pressing enter at the edge of an anchor that is a child of an
unbreakable element, we inserted line breaks in the anchor itself, which
is unexpected. This inserts the anchors after/before it instead.
closesodoo/odoo#81662
X-original-commit: df6f8dd0c54c40ea7edbd3821ae068d79b1b7af7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The snippet selection was lost on every action in mass mailing. The code
that prevents that was checking if the target of a click was the body
element but for mass mailing we needed to be a little bit more
restrictive since the editable area is not the body itself and we want
to actually prevent changing the snippet selection when the target is
the iframe target as well.
Since the mailing itself has a options, the sidebar is actually never
empty and therefore removing a snippet doesn't bring us back to the
block tab. Since therefore also ensures that we actually do.
task-2716397
X-original-commit: ecdb71bf6a566f5f6c294904e84f2132561dbb3c
Part-of: odoo/odoo#81662
Same issue as odoo/odoo#71068 but for subcontracting rather than a MO.
Steps to reproduce:
- create a subcontracted product w/tracked component
- create receipt with subcontracted product (don't forget to set
"Receive From" = subcontractor
- fill in Detailed Operations with tracked component lot/sn, but Done=0
- Try to record production
Expected Result: Subcontract production is done + window closes
Actual Result: nonsensical "The quantity to produce must be positive"
validation error
Discovered during task: 2695173
closesodoo/odoo#81649
X-original-commit: 646789811c1f874160318badfe8105d84057b8bd
Related: odoo/enterprise#22998
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Both mrp_subcontracting and a module in Enterprise both inherit
`mrp.mrp_production_form_view`. This was leading to a conflict where the
Enterprise view could overwrite the invisible=1 attribute added by
mrp_subcontracting, therefore we update the views to avoid this.
Part of Task: 2695173
ENT PR: odoo/enterprise#22637
X-original-commit: 6317c34808d381e54bae2431fec2de4b8503b447
Part-of: odoo/odoo#81649
Fixes 2 issues:
Issue 1: wrong view shown when registering strict consumption
To reproduce:
- create tracked product to subcontract
- create subcontract BoM with no tracked components + strict consumption
- create receipt of subcontracted product (remember to select From =
subcontractor)
- click on `action_show_details` burger button in Operations
Expected result:
- Detailed Operations window with no move lines in it (i.e.
stock.view_stock_move_nosuggest_operations view)
Actual Result:
- Detailed Operations window with move lines w/ 0 Done
(i.e. stock.view_stock_move_operations view _ lines also do
not get filled in when using the `action_assign_serial_show_details`,
=> twice as many lines as needed end up in view)i
Similar issue can occur when using a non-strict BoM + tracked product.
Issue appears to be that conditional was incorrectly updated during
refactoring to allow non-strict BoMs also record components.
stock.view_stock_move_operations view should only appear when all
productions are recorded
Issue 2: Consumption warning wizard not showing correctly
To reproduce:
- same as Issue 1, except consume less than BoM amount
Expected result: Consumption Wizard
Actual Result: stock move view shown instead
Issue was due to 'form_view_ref' value in context of picking view,
therefore we force clear this value everytime we expect this wizard
to open.
Task: 2695173
X-original-commit: b9990a5dab8731a8f69fd07aa73a318fc9d4a808
Part-of: odoo/odoo#81649
A horizontal padding was applied to each media list item, making it
impossible to make the media list items full width. Full width media
list items can always be reduced by adding padding in the editor, but
the converse is not true. For this reason, this commit applies
horizontal padding 0 to each media list item in the snippet template.
task-2716398
closesodoo/odoo#81637
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When the cover snippet's image is in full width, we don't notice it's
not centered. But reduce its width and it appears at the left of its
container. There is no reasonable scenario in which this would be what
we expect so this commit centers that image by default.
task-2716399
Part-of: odoo/odoo#81637
The footer templates were using a font awesome icon for the copyright
sign, while it has a unicode equivalent, which is easier to edit and
lighter.
task-2716401
Part-of: odoo/odoo#81637
Have an MX database set up
Activate multicurrency (MXN and USD)
Have several rate for USD
- yesterday 0.047939098170
- today 0.048486729180
Make an invoice, dated yesterday for USD 116, tax 16% (cash basis)
Create a received payment dated today, for USD 116
Reconcile invoice and payment
Jounal items will be created for the invoice, for the exchange
difference and for the cash basis entries, but there are redundant
entries addressing the tax.
This occur because when reconciling the payment with the invoice the
system create the cash basis moves and reconcile them. During this inner
reconciliation exchange difference move are created (1) just for the tax
line.
Then the outer reconciliation flow continue and compute the exchange
difference moves, considering all cash basis items created before. A new
couple of journal items will be created to account for the difference in
tax, but this is redundant since it was already covered before (1)
opw-2685570
closesodoo/odoo#81624
X-original-commit: 03bf311bfde98f28a9b8e73953869a42b828c5e3
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Before this commit, when the redirection of a form was an anchor and
that anchor link came from the anchor option, the scroll animation was
not triggered.
task-2172312
closesodoo/odoo#81622
X-original-commit: 5db838cfc91d8438d6234df00bd8174768445974
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
There were some issues when auto printing the receipt with images.
It could happen that the receipt was printed and the image were not yet visible.
To fix this, we make sure the image are rendered on the receipt before we print it.
closesodoo/odoo#81579
Ticket-id: 2688238
X-original-commit: 10d47ed2aee17f2a0d0b76c49c623fb3da4d5e30
Signed-off-by: Masereel Pierre <pim@odoo.com>
When a ticket was sent by email or printed, the qr code was not
visible. This was because it was not correctly put in the report and was
injected in the DOM throught the mounted of the component.
So we are now setting it in the qweb and prepare the values in
export_for_printing instead of inject it through the component that
display it.
closesodoo/odoo#81573
X-original-commit: 1ca12f15d39f9cda09fd1743184d64daf82adabc
Signed-off-by: Masereel Pierre <pim@odoo.com>
- Create a TAX A and TAX B
- Create a fiscal position, and TAX A in scr and TAX B in dest, and add other tax map
- Use this fiscal position in POS
- A month latter unactive TAX B (because the law have change).
--> You have an issue during opening the pos
closesodoo/odoo#81427
X-original-commit: 7471f13264d7002bd5570b5008565d3cc84042e6
Signed-off-by: Masereel Pierre <pim@odoo.com>
Expected behaviour
When having multiple promotions with, for example, a promotion of X% for the
first order and a promotion of Y% (Y<X), we should apply the first promotion
on the first order and then don't get this promotion into account to choose
the best promotion for a future order, so that we have:
1. A promotion of X% on the first order
2. A promotion of Y% on every other order
Observed behaviour
When trying to apply promotion on other order, nothing seems to happen, as
Odoo take the already-used X% promotion into account, being the most
interesting promotion, select it as the best promotion to apply and then
apply it to finally get a result of a 0% discount as the promotion has
already been used.
Problem Root Cause
As it can be seen in the commit, the error comes from the fact we filtered
the available promotion with a non-strict inequality.
Validation
A test has been added in test_program_numbers.py to validate our fix
Related issue
- opw-2674681
closesodoo/odoo#81633
X-original-commit: 9bade951570d79e2623d3bf548df445c22c31034
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
When the user has no rights on the Employee app, he can still
see the information on the employee public view
If the skills module is installed, there are add and remove buttons
displayed even in the absence of user rights.
Buttons should be hidden if the user has no rights to edit the
skills and resume
task-2702678
closesodoo/odoo#81617
X-original-commit: fd2f6e9586c5c853ba36d7ce511591574fac0bb2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
How to reproduce the bug:
- install l10n_de
- in Settings/General Settings/Business Documents, configure document
layout to DIN 5008
- try to print one of several:
=> timesheet entries
=> direct debit mandates
=> follow-up reports
Bug:
When you use the DIN 5008 report defined in l10n_de, the o variable is
defined which generates an error.
closesodoo/odoo#81505
Opw: 2659703,2699563,2649221
X-original-commit: c6ffe7eb65844dad33db4390ffeeb24d61a36f40
Signed-off-by: William André (wan) <wan@odoo.com>
We did not add the description of the invoice line on the print-out
of the invoice. (probably because description is not translatable
and the name of the product is)
If a product is set, the name of the product becomes the description (label)
on the invoice line, but of course this depends on the language.
So, we only add the description if it does not correspond
to either the English (/standard language) or Arabic product description.
(People can always add both languages in the same field)
Of course, if the product is not set, it will also just show the description (label).
Also put the : of the payment reference in Arabic on the other side.
closesodoo/odoo#81620
X-original-commit: 3485c7ad368d9c841d75a0b0614082b8989e2afc
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
We had a constraint(raise) that said that the delivery date needed
to be after the invoice date, but this is putting too many
constraints.
However, we put a help message to say that they should put the
date of the last delivery. Also, the delivery date should not be
changed once confirmed like the other information in the invoice.
X-original-commit: 9e1a0fb37930de3c8cbc0ecf88052e5ddf55d474
Part-of: odoo/odoo#81620
Before this commit users were not able to edit their settings if they
had a linked employee for a company that was not currently active for
them.
This is due to the fact that since the employee_ids field is considered
`safe` to read/write by your own user the fields were loaded in sudo and
thus bypassed the security rules that were meant to prevent that issue.
The security rule is now enforced as a domain on the `employee_ids`.
TaskId-2715341
closesodoo/odoo#81612
X-original-commit: b5b105eabd90419a5856e8279e277743c5915fc9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
When having a shipper for a DO, if the user creates a backorder, the
information won't be sent to him.
To reproduce the issue:
(Use demo data)
1. Create a sale order SO with 2 products
2. Add Shipping: UPS US
3. Confirm SO
4. In the associated picking, deliver one of the products and create a
backorder
5. Process the backorder
Error: In the chatter, there is a label for the first picking but there
isn't any label for the backorder
When confirming the sale order, the backorder is first created and then
the initial picking is sent to UPS. As a result, considering the current
body of `send_to_shipper`, the field `carrier_tracking_ref` of both the
initial picking and the backorder is defined with the same value (i.e.,
the tracking number of the initial picking)
Therefore, when processing the backorder:
https://github.com/odoo/odoo/blob/f29da79ef64a8166e54544d1787912be5665076a/addons/delivery/models/stock_picking.py#L126-L129
`carrier_tracking_ref` is already defined, so `send_to_shipper` won't be
called
OPW-2678549
closesodoo/odoo#81599
X-original-commit: 89f9281b096e24583ff7780a1bb42f0c4b7b477e
Related: odoo/enterprise#22980
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Prior to this commit, the color presets generated by the color palette
would always be visible by the user which could lead to confusion.
Most users would click on the presets and edit them instead of editing
the color palette.
This commit groups the presets into a collapsed section under the color
palette to incentivize the user to click on the color bubbles instead.
task-2687469
closesodoo/odoo#79921
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
All lunch locations were showing regardless of the company the user is
logged in.
Now only the lunch locations of the current company are showing.
closesodoo/odoo#81603
Taskid: 2710417
X-original-commit: 3e87770bb8faf2a58ba0b429148f64256537a4da
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The test `test_unused_accrual_postponed` was expecting at least 25
holidays to be accrued, but started failing around mid-December.
closesodoo/odoo#81592
X-original-commit: c2865b7f5b654a61d4b2690133797aa39712b00d
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
When Freezegun is used with the `start` and `stop` method and the test
fails before the `stop`, the time stays frozen for all the other tests.
When it happens on runbot, a lot of tests brake with a lot of noise as
they are false negatives.
X-original-commit: 048796dc125b0d494f3c2fcd12625a84ee5cd91d
Part-of: odoo/odoo#81592
Tests showed that users didn't understand the goal of the search bar
above the snippets block under the tabs.
This commit changes the placeholder of the search bar to better
indicate its purpose.
task-2607728
closesodoo/odoo#81222
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
SPECIFICATION
Before this commit, when clicking on the 'See Results' button
the page was loaded on the previous one.
After this commit, the page will open in a new tab.
We also took the opportunity to replace all the '_blank' value
occurence by the 'new' value as '_blank' value is not a valid
value for the 'target' field of the 'ir.actions.act_url' model.
LINKS
Task-2700305
PR : odoo/odoo#80858
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Expected behaviour
When buying something on the website, the amount to be paid for the client
should take into account the choice of the shipping method.
Observed behaviour
When choosing a different shipping method than the default one, and only
if this method is a third party acquire, the total amount is updated on
the website, but the amount the client will be asked to pay doesn't take
into account this change, being computed according to the default shipping
method.
Steps to Reproduce this Issue
1. Select a product on the website and add it to the cart
2. View and validate the cart
3. Change the shipping method
4. Click on the "Pay now" button
Problem Root Cause
This issue comes from the fact that the amount was written in the view when
creating the cart view and wasn't updated by a change of shipping method.
Related issue
opw-2686369
closesodoo/odoo#81587
X-original-commit: 617ed0ef47d1496b912d5b85a494e3cda897da4d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
mass_mailing used to show the body_html but now shows the body_arch
field instead (and body_html only in debug mode). As a result, one demo
that had only defined body_html showed an empty field. This moves
the body_html of that demo into its body_arch.
task-2710460
closesodoo/odoo#81586
X-original-commit: a313276e7a84eac053b0b35b290e3f3132c051e2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Set up a [TEST] product with a tax A
Create a SO with [TEST] and a tax B and confirm
Open POS, import the created SO
[TEST] will be imported with tax A
while tax B should be pulled from the sale order line instead
opw-2699793
closesodoo/odoo#81580
X-original-commit: 0a5cbfeb7edcce6e6bb915d6e61c736491695ada
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
When an attendee's registration was archived, their seat was still
considered taken, which could be problematic such as in cases of
limited seat availability.
Only non-archived registrations are now counted as seats. The same
error as with regular registrations will be raised if there are not
enough seats available to un-archive a registration. These ValidationError
messages now show the name of the fully booked event.
A few python tests are included to verify the impact of (un)archiving on
seats availability for events and for event tickets.
The appearence of archived registrations was also not different in form
and kanban views, which is somewhat confusing and inconsistent with the
aspect of archived records in Odoo. Actions buttons are not available on
archived records.
Filtering in the archived records needed to be simplified from a "Custom
Filter" to a one-click feature, already available for many models.
Task-2646298
closesodoo/odoo#77715
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Improvements of the Inventory Adjustements page, among which:
- Add a new 'Apply All' button (without the need to select a record)
- Show the date at which the last count was done
- Add warning icon next to duplicated SN
- Allows to change the lot_id when empty and no quantities are set
closesodoo/odoo#78361
Signed-off-by: Arnold Moyaux <arm@odoo.com>
When inserting a new paragraph by pressing 'enter', it would
automatically close the mega menu.
As inserting a new paragraph triggers a historyRevert at the editor
level, it was leading to two issues:
- The widgets of the public root were stopped then restarted. The
StandardAffixedHeader (the public widget for the header), as an
Animation, would start its effects when started, which would close its
dropdowns. This commit changes the _updateHeaderOnScroll method to close
opened menus and dropdowns only when the animation has scrolled.
- Opening the dropdown was a recorded step. When history was reverted,
it would close it. Now toggling the mega menu is done with the editor
observer unactive.
task-2668908
closesodoo/odoo#81559
X-original-commit: 675430d53f6ef048b77afe95395bd760d3f5a2be
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
[1] changed the structure to adapt it to the new dropdown menus. This
commit changes the css according to these changes so that mega menus are
correctly displayed inside the extra menu items dropdown from the auto
hide menu.
[1]: 29b9280c44534d2f210dbcea83e0049365949f48
task-2668908
X-original-commit: fdd06d70fa78098cbfe0bd5200acd2fa171f4576
Part-of: odoo/odoo#81559
This commit adds the possibility to modify some background colors of the
mega menus so that the templates are fully editable.
Some of these templates have a column with an extended background, using
the :before css pseudo element.
As this is not a DOM element, it cannot be changed from javascript.
It was decided that using shapes would not produce the same effect as
the designer intended, and that it would be too confusing for the user
to be provided with an option allowing to extend the background of a
column.
Therefore, these specific s_mega_menu_gray_area elements must have their
background hardcoded.
task-2668908
X-original-commit: f01c74118ad4c772fb18866956ab9fb214f781fa
Part-of: odoo/odoo#81559
Co-authored-by: qsm-odoo <qsm@odoo.com>
When editing a countdown with a redirect action, sometimes the
countdown block will be hidden when toggling the "Hide countdown at the
end" option.
The problem is caused by the button that allows previewing
and editing the end message of the countdown, this button does not
apply in the case of a redirect action though. However, the button can
still be activated by selecting a different end action first and
switching to the redirect action afterwards, in which case it will
incorrectly hide the countdown.
task-2638366
closesodoo/odoo#81557
X-original-commit: 7f6ebee33e8a82d7ccdf155c3a543898b187389c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The countdown snippet has an end action that can be configured to show a
message when the countdown reaches zero. A button in the editor toggles
a preview of this message. However, a bug currently makes the preview
disappear whenever the snippet's widget is restarted... which occurs by
simply hovering some other options.
To solve the problem, the preview visibility is now controlled by a
separate css class s_countdown_enable_preview overriding d-none. This
way, the preview visibility no longer interacts with the widget's logic
and is no longer affected by the widget restarting.
task-2638366
X-original-commit: c37354d457f5b868673b4f974e401f4c635062d2
Part-of: odoo/odoo#81557
Co-authored-by: qsm-odoo <qsm@odoo.com>
A console.warn instruction was added with [1] in case an user interacts
with an editor widget which does not declare any linked option method
(as it is most probably a dev mistake). We have cases where it makes
sense though, adding a custom button with more complex events and
interactions or simply in some strange custo. This warning prevents to
test those uncommon behaviors in a tour test (which is what following
commits of this PR are trying to do).
This commit simply removes the warning.
[1]: https://github.com/odoo/odoo/commit/be05ac7e2b8d866a72693b761f3bc8576d54e59e#diff-ffb61e86e6b8297ef8997f9c605de14de896b54161c032d88a80bbaeac4f89beR490
X-original-commit: 1b18747c7a328df142d7b2cf206a84c39d5eac05
Part-of: odoo/odoo#81557
When you reload the pos (F5), this.payment_terminal is undefined.
And you can update the amount even if the payment is done.
closesodoo/odoo#81546
X-original-commit: 2e10f33511ced41f296e0f65d2d042f4e041cacb
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this commit, the computed field _compute_is_system make a write which
one is a bad practice and trigger a lot of others calls on res.user model.
opw-2716468
closesodoo/odoo#81555
X-original-commit: f85a67935c5dfa660e94f9bed8e8058c8df256cc
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Since commit [1], the user context wasn't put in the context
sent when executing a server action (only the context of the
action sent). This commit fixes the issue.
[1] 7354d1686915ec21437fc677f15a6c5409106492
closesodoo/odoo#81552
X-original-commit: fee371be291ba3d6f1adc71c08420b6510fdf386
Signed-off-by: Géry Debongnie <ged@odoo.com>