The pos.order.line quantity wasn't considered when computing the discount amount.
E.g. buying 5 products (1$) at 50% would only show 0.5$ as discount_amount, instead of 2.5$.
Followup of #43587closesodoo/odoo#51872
X-original-commit: 96e96284fceb2f68838c85f04c40da65176eb006
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Due to commit odoo/odoo@8e48ba3eb5
a span was added to show the time before the title on a event in
month view.
DOM of event
+---------------+
| SPAN FOR TIME |
+---------------+
| TITLE |
| |
| |
+---------------+
This commit, hide the empty span when is not needed, to avoid empty
blank space.
Steps to reproduce:
* Go in calendar app
* Go in view week (BUG)
closesodoo/odoo#51859
X-original-commit: 8456be44b1bc6746563cbca5366257a1da8b4a53
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
As some payment acquirers require the email to be set,
a warning is shown when generating a payment link if
the partner does not have an email.
OPW-2254011
closesodoo/odoo#51857
X-original-commit: 6f61e89ab9b947ca54cfd8dbd5470083a625d24e
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
purpose : Improve the efficiency of encoding a next activity by pre-filling the next activity type.
Set a value by default in the field Activity Type following this rules :
1) To do
2) first in sequence for this model
3) first in sequence with no model set
task-2177020
Closes#50550
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, mail_bot was an auto install module. However it is quite
disruptive during the onboarding. Moreover it is not doing what is expected
from users.
We therefore set it as not auto install, to avoid having it installed by
default in too many onboarding.
Task ID 2252752
PR #51300closesodoo/odoo#51897
X-original-commit: ed8cbae3485b6409603e91294d7f6535f3a5e45d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create a dropship product
- Set a supplier
- As a portal user, buy the product on the eCommerce
The portal user is added as a follower of the PO created.
This is a side-effect of `sudo` keeping the current user and the
following adding the current usr as a follower:
https://github.com/odoo/odoo/blob/96b0dcf9e51f5a924e2cbf618c2ee5462cc1f03f/addons/mail/models/mail_thread.py#L262
When the PO is created from a procurement, the current user might not
have access to the Purchase app. For example, the user might only have
access to Sales. Therefore, there is no need of adding him as follower.
opw-2249357
closesodoo/odoo#51895
X-original-commit: a561ad050e0c8cfe1dafb699c4c84c7c39bf777d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
After each reboot, the IP address of the IoT Boxes changed.
The problem was due to the fact that the UID that was sent to the DHCP
server was sometimes different after the box had been rebooted.
The UID was saved to `/var/lib/dhcpcd5/duid`, which was deleted after
every reboot. The UID then had to be recomputed. This UID contains a
timestamp, which was sometimes off by 1-2 seconds from one boot to the
other. The lease was then not found on the DHCP server and a new one
was created, with a new IP address.
We replace the UID by the clientID, which is not dependent on the time
but only on the MAC address of the IoT Box.
closesodoo/odoo#51889
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
* avoid doing super where we removed the super method: Was done in adapting l10n_cl to do without the methods in l10n_latam_invoice_document
* journal name to create
* at least fix for the document type itself
* making it work like before with shared sequences
closesodoo/odoo#49095closesodoo/odoo#51496
Related: odoo/enterprise#9699
Related: odoo/enterprise#10654
Signed-off-by: Josse Colpaert <jco@openerp.com>
- Create a vendor bill with a line having a group of taxes
An additional tax line is displayed under the bill total with a 0 amount
because the created group of taxes has a zero amount.
closesodoo/odoo#51802
X-original-commit: adb02066f7cbead66eca21185f2ad142b46298a8
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
- Activate 'Delivery Packages', 'Storage Locations'
- Open Inventory → Configuration → Operation Types
- Create a new one with:
name: Pack Transfer
Default source location: Stock
Default destination location: Stock
Move Entire Packages: True
- Open product [FURN_7777] Office Chair
- Use button 'Update Quantity' to create a new inventory:
Choose 'Shelf 1' as location
Create a new package 'PACK0000001'
Set any quantity
- Go to Inventory → Transfers
- Create a new one (WH/PT/00001) with:
Operation Type: Pack Transfer
- Shipping Policy: When all products are ready
- Create a Package line (package level) to move the package
'PACK0000001' to Shelf 2
- Reserve the transfer WH/PT/00001
- Duplicate WH/PT/00001, which produces WH/PT/00002
From there, WH/PT/00002 seems empty, no apparent move, move line or
package level. However the new transfer is misbehaving, for instance:
- Add a new operation in WH/PT/00002 for 3 "[E-COM10] Pedal Bin"
- Mark as todo and check availability
The move for "[E-COM10] Pedal Bin" is reserved and the transfer
WH/PT/00002 is "Waiting" while it should be "Ready".
When the `stock.move` are duplicated, the value of `package_level_id` is
copied, linking the new `stock.picking` to the wrong package.
There is no need to copy the `package_level_id`. When not copied, the
list of products is correctly added to the new picking, without taking
packages into account.
opw-2252969
closesodoo/odoo#51798
X-original-commit: ecf726ae8221e6871c1e391294c633d8b6bcaa9a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this -
unable to validate batch picking if - any of picking from
batch is manually done.
Fixes-2238699
closesodoo/odoo#51791
X-original-commit: 4123809a56c0aadc752cd9a9c331cccee34c0889
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
- Go to any page where there is a chatter
- Click on the followers list icon to display all followers
- Click on the icon (not the name) of a follower
This generates an error.
The redirect is executed in JS by retrieving the model and the id added to the <a> element.
When clicking on the follower icon, we are not clicking on the <a> element but on a child.
The model and the id have to be retrieved from its parent element.
opw-2256795
closesodoo/odoo#51790
X-original-commit: 11c4a2907e635662216ebc0e745f0ce9d16771cb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- Create 2 companies C1 & C2
- Creae a product P
- In C1, set the routes as MTO + Buy, add a supplier
- In C2, add a BOM in kit for P
- Go back to C1 with C2 as an allowed company
- Create a SO for 1 unit of P, confirm
The PO for P is not created.
It occurs because the BOM of C2 is retrieved when running the
procurement, while it shouldn't be.
opw-2260945
closesodoo/odoo#51779
X-original-commit: 96b0dcf9e51f5a924e2cbf618c2ee5462cc1f03f
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Task 2005158
Manage the e-faktur numbers, create the required csv file to send to the
tax office, and mark invoices taken care of manually.
closesodoo/odoo#51767
Signed-off-by: Josse Colpaert <jco@openerp.com>
Create a coupon program following these steps:
- Set name
- set 'Discount Apply On' to 'On Specific Product'
- Add specific product
- Set 'Apply Discount' to Fixed price
- Input the fixed price
- Save
Generate a coupon and try to apply it on a quotation.
Error will popup because Not all conditions are met.
The field discount_apply_on (invisible with fixed price) keep the
application "specific_products". Fixing by checking the values in the
backend.
opw-2257783
closesodoo/odoo#51574
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Check backorder is divided in 3 blocks:
1) quantities on move lines linked to a move
2) quantities on move lines without moves nor products but with a
package
3) quantities on move lines without moves but with a product
1) added quantities in the move's uom, 2) added quantitis in the product
uom, 3) doesn't seem to be used (and shouldn't be). Clarify all of that.
task-2239964
closesodoo/odoo#49790
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Bugs
====
On e-commerce, the portal user is not able to upload
attachment with his comment, under a product.
On website blog, the portal user is not able to upload attachment with
his comment, in the discussion of the blog.
And, in `website_crm_partner_assign`, portal user is not able to upload
attachment with his comment, under the lead/opp.
Issue
=====
In the create method of the mail message, we check is the user can
read the attachment. If he can't, we raise an error.
But, the method that make the verification doesn't care about the access
token. So, when a portal user want to upload an attachment on a "public"
record (without a token on the record to sudoed it) the error is raised.
The portal user give an token for the attachment, so he should be able
to attach it to the message. This verification is done with
`_portal_post_check_attachments` so we can sudo write the attachment
after the creation of the mail message to bypass the verification.
Task-2214795
closesodoo/odoo#51772
X-original-commit: d59f8f62dbc7771fee51c3593f89f9b6832bb7ec
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create a SO, add a product with automated valuation
- Validate that SO
- Validate the picking
- Generate the invoice and validate
- As a limited user with only 'User' Inventory access rights, return the
picking
- Validate the return
An `AccessError` is raised on `stock.valuation.layer`.
A regular user should be able to make a return, but not access the
accounting information. Therefore, use `sudo` where appropriate.
opw-2256074
closesodoo/odoo#51764
X-original-commit: c819a7e2fccbecce344ac74a33f0653eb8ba1027
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit adapts several views to make them use newly defined
widgets, the new decoration-xxx mechanism on fields, and to adapt
them to the new design of buttons.
used following widgets and designs -
1) decoration-bf
2) many2one_avatar_user widget
3) badge widget
Task-2248231
closesodoo/odoo#51074
Related: odoo/enterprise#10528
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Revision 29b3b67a16 introduced payment with iDeal but accidentaly
introduced an issue where some payments did not go through (in fact,
some cards could not be saved, preventing the payment to occur).
This fix prevents this issue from happening by clearly differentiating
between returns from the Checkout process and from the Elements process;
in the case of a Checkout flow, the 'card' key is always present in the
data dict but can be equal to None if a non-card payment method was used
(e.g. iDeal) while in the case of an Elements (payment from Odoo) flow,
the 'data' key is never present and the card information has to be
downloaded using a get request to the Stripe API.
opw-2253269
closesodoo/odoo#51269
X-original-commit: f0ba15cda070e968699cf77ac0ba58234dbdaf51
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
*: website
The keyboard navigation mixin was initially only used in the web-client,
because of this, some of the logic for hiding the overlay was put inside
of the web-client. We recently made keyboard navigation available on
website [1]. The handlers that would hide the overlay when alt-tabbing
or clicking on the page were not registered. This commit fixes that by
making the keyboard navigation mixin register the overlay-hiding
handlers itself.
[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660closesodoo/odoo#50122
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Some tags are not necessary in the HTML template and we can remove them to
have a proper HTML output.
Task 2171753
closesodoo/odoo#51757
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
- Install eCommerce, Delivery Costs & Delivery Coupon
- Add a delivery method for US only
- Publish the delivery method
- Logout
- Order something, select your delivery method
and pay with wire transfer
- When it's done, click 2 times on the browser
back button
Traceback
Cause
When going back, the order is empty and
we are doing self.ensure_one() on it
when looking for free shipping lines
Solution
Check if the order is not empty before
looking for free shipping lines
OPW-2243736
closesodoo/odoo#51756
X-original-commit: 7b37c9d8ac1ccb1b6684308cf4dedf3a4b6bed11
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Issue
- Install eCommerce & Delivery Costs
- Add a delivery method for US only
- Publish the delivery method
- Logout
- Order something, select your delivery method
and pay with wire transfer
- When it's done, click 2 times on the browser
back button
Traceback
Cause
When going back, the address is incorrect
(public user address).
So since you have 2 delivery methods and
your address have only one, an assert
cause a traceback
Solution
This is the right behavior but I think
it's better to give a clear error message
instead of a traceback.
OPW-2243736
X-original-commit: 0222b727c143593debaf40a4ab54bda2f6b42213
View rendering from javascript has recently been made to check
permissions (See commits 64d0dab0a6
through ccc98e0169). Some assets required
by the iframe editor are rendered in JS so that they can be injected
into the iframe, but their permissions had not been updated, causing a
crash when trying to create or edit a mass_mailing campaign.
This commit fixes that by adding groups="base.group_user" to the
required templates.
closesodoo/odoo#51598
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit:
The `display_name` of the product was showing the code in the "Recently viewed products",
the code value isn't needed to be seen in the website.
After this commit:
More user-friendly product name is shown
OPW-2258774
closesodoo/odoo#51719
X-original-commit: be4d0d58081bea1b75ceee8f90372ed8cedbee2e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, when the user tries to create a new quant, even if
the product doesn't use an expiration date, he/she will not be able to
create the quant.
The issue was as `removal_date` field is added by `product_expiry` in
the quant list view, the field is on the values used to create a new
quant but not in the list of accepted field for quant creation.
So, it raises an UserError.
task-2260085
closesodoo/odoo#51482
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The _view_get function is a recursive function used to retieve all the
views related to a view (inherited or t-called).
The issue is that by an odd set of circumstances it is possible to have
a loop in the view graph. Resulting in the recursive function being
called until a "maximum recursion depth exceeded" error occurs.
Example of a loop: A t-call B and A inherit from B
This is possible on an update of a view that has been forked by website:
If the view A was doing a t-call on B and is has been duplicated with
the arch modified.
When we update with the changes A now inherit from B instead of t-call B
Since the arch was modified it will not be updated so A will still
t-call B but the inherit_id of A is unchanged so it will be updated to
reference B resulting in a loop.
closesodoo/odoo#51620
X-original-commit: 63e1e84ebd7e609d6e06d83dc0f0092688b013eb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, block for adding new Shipping address was always visible even if It is disabled/Not needed.
With this commit, We respect website configuration (Website --> Configuration --> Shipping Address) to display this block.
closesodoo/odoo#51732
X-original-commit: da9d9d039bfd0ca2a7e27671ac61a0b557d531d5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, when a SysTray dropdown is open the user can scroll
the element behind the dropdown.
After this commit, we disable the scroll until we close the dropdown.
Steps to reproduce:
* Open Odoo on "Mobile"
* Open the Activity SysTray
* Scroll the "NavBar" menu (=> Bug)
Note this fix is also applied in Desktop, as for me the "NavBar"
shouldn't never scroll on Desktop.
Task ID: 2231956
Task ID: 2234042
closesodoo/odoo#51716
X-original-commit: 7bb155991b9daec37edf73ef90cbad26268d76bb
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
- Confirm a Sale Order with a Customer Reference ('client_order_ref'
field) set;
- Validate the Delivery Order;
- Print the Delivery Slip report;
The display area of the Customer Reference field is not correct on
the printed pdf report
opw-2260756
closesodoo/odoo#51701
X-original-commit: 4f3a9a59394cac425e23b81b3fe811a592c6dae2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Create a promotion program with conditions:
- Minimum purchase in currency (ex 100$ tax excluded)
- Auto apply
- On current order
- Unlimited use
And reward:
- Free product
- 1 Quantity
Go to website shop. Fill an order with amount above the minimum
required by the program. The promo will apply and add the free
product.
Increasing the order amount will eventually make the free product
quantity increase, eventually overcoming the reward product
quantity.
Fixing by calculating the reward quantity using both minimum quantity
and minimum amount and using as cap the to reward product quantity
currently in cart
opw-2246138
closesodoo/odoo#51680
X-original-commit: 02331a34cf66117b27cfa1e96078b4721cbd1e70
Related: odoo/enterprise#10722
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The `@api.model` decorator prevent the call to the method from a button.
opw-2262445
closesodoo/odoo#51686
X-original-commit: 7de8420f2b645849a953376d6b1d8d663f3c8aa2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The button `action_open_product_lot` is added by the view `product_product_form_view_bom_button`.
Both the current view and the view `product_product_form_view_bom_button` inherited
from the view `product.product_normal_form_view`,
without any priority specified.
In order to make sure the button `action_open_product_lot` is in the view
when the view `product_product_form_view_bom_button` is loaded,
you either need to directly inherits from the view holding that button
`product_form_view_procurement_button`
either you need to increase the priority of the current view
so `product_product_form_view_bom_button` is loaded in priority.
Same thing for the view `product_template_form_view_bom_button`
Upgrade Request 47960
```
ValueError: Element '<xpath expr="//button[@name='action_open_product_lot']">' cannot be located in parent view
Error context:
View `product.product.procurement`
[view_id: 783, xml_id: mrp.product_product_form_view_bom_button, model: product.product, parent_id: 319]
```
closesodoo/odoo#51655
X-original-commit: 26fac2af85acb0ae9f9e479aec5eb16930d69e49
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Make sure a value is always set for the field `destination_account_id`.
opw-2254722
closesodoo/odoo#51615
X-original-commit: 9e68ec931d254ba563b4a16afa38b6003336a7cf
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Purpose
=======
On the hr_recruitment application, when archiving an employee, a
wizard pops out to ask the reason (fired, left, ...).
When archiving all the record of a column, instead of retrieving
the dbID, you get an action targeting the wizard model.
No need to call updateColumn at that time, as this will be done
when closing the wizard.
So adding this small condition fixes the traceback and changes
nothing on the flow.
closesodoo/odoo#51609
Taskid: 2259776
X-original-commit: a5b84b807be51c46f09e2103c107f4232e446bda
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Task 2201948
*These actions were either unused or only used in enterprise modules.
The first ones have been deleted, and the second ones have been move to
the corresponding enterprise modules.
* account.fiscal.year: the whole model has been moved to enterprise
closesodoo/odoo#46110
Related: odoo/enterprise#8706
Related: odoo/upgrade#1083
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Before this change the map view (the fix could also be in web_map module
but currently all dashboard fixes are at the same location) would have
a zero height so it was not shown at all in dashboard even if it was
loaded.
With this changeset, we set a 100vh height (total height of viewport).
opw-2257146
closes#51610closesodoo/odoo#51631
X-original-commit: c5bd63f60c8e34d8a947a6e4118ce707a2a894a6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>