In multi company (company A and B),
- Select the company A as main one, and select B too.
- Create a picking type and change the company to B.
- Don't select any warehouse.
- We can't save, because the company ir.sequence is
set to A instead of B.
Fix by apply the company_id of the picking type.
task-2372196
Add to `check_company` on `bom_id` of operation, to avoid company issue
after in MO when we create `mrp.workcenter.productivity.loss`.
Also remove the readonly on `company_id` to get the possibility of
modify it if the company_id of BoM change.
Before this commit when searching channels based on tags URLs were generated
like `/slides/all?tags=%5B4%5D`. This is not very clean, especially when
people share links.
In this commit we move to a slug-based URLs generation and support. URLs now
look like `/slides/all/tag/basics-1,gardening-2` which is more readable and
user friendly.
Support of all tags is maintained: `/slides/all?tags=%5B4%5D` still work
and display the same as `/slides/all/tag/basics-1,gardening-2` to ensure
links still work after applying this patch.
Along with this improvement this commit also improves the behavior of tags
for bot indexation. This is inspired by website_blog[1].
Task ID-2267840
Closes#53621
[1] - https://github.com/odoo/odoo/commit/0f2cada32319b3910d6ace6d412cfa94a646c9c7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Fix the issue of the added test.
- Also batch the `push_apply` + `_action_confirm` by doing confirm
in BFS instead of DFS. Improve a lot the performance when
the _action_confirm is on batch.
closesodoo/odoo#61567
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This tasks allow to see serial numbers or lot numbers for each products on the order.
It also add the same information on an invoice generated by the POS if the option is ticked in the pos config.
closesodoo/odoo#42410
Task-id: 2154835
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
TLDR: float_round in backend works differently with POS roundings in case of
negative amounts (refunds)
STEPS:
* setup rounding for POS, e.g. 0.1 DOWN
* make refund via POS for an amount with cents, e.g. -129.33
* proceed to POS payment
* BEFORE: is shows -129.40
* AFTER: is shows -129.30
WHY:
* This follows rule ``round(-x) = -round(x)`` -- this way we don't have
difference in absolute values for order and refund.
* See also https://github.com/odoo/odoo/commit/ea2c80cad018da6390ea9d116733de691907e1e4
---
opw-2357917
closesodoo/odoo#61551
X-original-commit: 11541944373de3f35c611cf012a0f65d471d12a5
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
see and set priority on sales orders and manufacturing orders in forecasted report
without having to go to the SO/MO
add the priority star icon in front of the SO/MO reference
changing priority should reload the page with reordered SO's/Mo
add a unreserve button next to 'reserved from stock' in the replenishment column
add total order and customer amount in used by column
remove time in delivery/receipt dates
change column headers (Quantity -> the UoM of the product, Expected Receipt -> Receipt, Expected Delivery -> Delivery)
change 'Draft SO' -> 'Quotations' and 'Draft PO' -> 'Requests for quotation' and add links
mobile view: display KPI's on new line
check decimals on quantities, must be 2
closesodoo/odoo#60578
Task: 2349142
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Create a tax as follows:
* Tax Computation: Percentage of Price Tax Included
* Tax Scope: Purchase
* Amount: 100%
* Included in Price
* Affect Base of Subsequent Taxes
Create a vendor bill with the tax on the line
Change unit price
The total does not change
This occur because when having 100% tax debit/credit are unchanged.
So the onchange `_onchange_mark_recompute_taxes` is not triggered and
the tax lines are not updated, thus not changing the
total (as in this case the invoice total is just the tax value)
opw-2370861
closesodoo/odoo#61555
X-original-commit: 9e203cc016b45875f699ffab24fe3f8382a97303
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
mail_template_sale_coupon is specific to sale_coupon so we are moving
it back to sale_coupon module. Additionally, we add a way of selecting
a mail template when generating coupons for customers.
In some cases, the edit mode on the production form view is not already
rendered when hte tour try to write '1' in the qty_producing field. This
lead to a fail of the Main Flow Tour.
This commit specifically trigger the input tag to be sure the text will
be inserted in edit mode.
closesodoo/odoo#61541
X-original-commit: 426a4306c911de2a47bd804dde0d67aa19a22b67
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
This fixes a very obscure bug that happens on workers serving multiple
databases. Consider two databases A and B with the same model M, that
does not have a field 'name', but has a custom field 'x_name' only on
database A. The bug can be reproduced with the module 'account' and its
model 'account.register.payments'.
Assume the server loads a registry for database A. In that registry,
the model M uses 'x_name' as its _rec_name, and the field 'display_name'
on model M determines its dependencies to be the field 'x_name'.
Now assume the server load a registry for database B. In that registry,
the model M has no _rec_name. However, an optimization reuses the field
'display_name' for the model M on the registry of A. The field's
attribute 'depends' is equal to the tuple ('x_name',). When the ORM
tries to resolve the field's dependencies, it does not find the field
'x_name' on M and crashes.
In order to avoid this situation, we forbid the usage of 'x_name' as
_rec_name on non-custom models.
OPW 2349238
closesodoo/odoo#61534
X-original-commit: 731e676fa8a9f7bdc6a66056c124c3b39a0800ad
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
That should fix all detection issues once and for all.
task-2366680
closesodoo/odoo#61528
X-original-commit: cf6961fba38ed619bf7bfb908c3aadde0f694648
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Escaping the match name is escaping an already escaped string from
`postMessage`. How ever we need to escape the string from
`this.mentionedPartners` and `this.mentionedChannels` since they are matched
with an escaped string.
This fix the bug when mentionning a channel with `&` in it's name.
task-2366680
PR https://github.com/odoo/odoo/pull/60593
X-original-commit: fecd2b28309b0fa4e5ecb8c7d26f6a335036e740
Hide the forecast widget in case of kits. Indeed:
- the forecast report doesn't support kits
- the semantic for a kit forecast is far from being obvious, especially
in case of partial deliveries, returns, returns of returns, etc.
Better hide it than displaying an incorrect information.
closesodoo/odoo#61522
X-original-commit: c1fccaee5dd676f2fe07bb5c17eb2967ee6b742e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Pupose of the task is, to set up a dedicated 'dashboard' reporting menu
item, and make the graph view the default the other 'leads' and
'opportunities' reporting menus.
So in this commit, change the default view graph in normal report
(except dashbaord menu) and each menu should be submenu of reporting
menu Also apply default filter for lead reporting menu
TaskID: 2311392
Related Enterprise: https://github.com/odoo/enterprise/pull/12419
closes odoo/odoo#55598
Closes: #55598
Related: odoo/enterprise#12419
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
We can have payment.transaction references of >20 characters. This
happens automatically if you have long sale.{order,subscription}
sequences (especially through website_payment because it adds multiple
suffixes, e.g. SO2020/1234567 could turn into
SO2020/1234567-12-1-1-1). We POST the full reference via the
x_invoice_num variable. Unfortunately Authorize specifies a maximum
length of 20 for this field [1]. So when Authorize POSTs back to
/payment/authorize/return it only specifies the first 20 characters in
x_invoice_num. E.g. when POSTing
{
...
'x_invoice_num': 'SO2020/1234567-12-1-1-1',
...
}
we receive back in /payment/authorize/return:
{
...
'x_invoice_num': 'SO2020/1234567-12-1-',
...
}
This causes _authorize_form_get_tx_from_data() to not find the
transaction which results in a ValidationError.
To fix this also pass the reference in the x_description field. It has
a more generous 255 character limit [1]. Then search using both.
We can't get rid of x_invoice_num entirely because we cannot assume
the payment_authorize.authorize_form will be updated (even more so
because it's a noupdate="1" template). By still using it in
_authorize_form_get_tx_from_data() we ensure that everything keeps
working regardless of whether or not x_description is included in the
template.
[1] p39 in https://www.authorize.net/content/dam/anet-redesign/documents/AIM_guide.pdf
opw-2373433
closesodoo/odoo#61449
X-original-commit: 3a220d3ad2999a21d54924940574ba96a9c07154
Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
A cash rounding precision must be strictly larger than zero to follow
the restriction introduced in e270e9e0cc.
opw-2341804
closesodoo/odoo#61382
X-original-commit: 563752358d233d4fc9cf1d7e7abd0b1656dc82c1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Small refactoring to allow calling the method to update the debug
manager action independently from `current_action_updated`. Needed for
3d80ff9998dd402ac48d280e5d6b81aaf91b6180.
opw-2365539
closesodoo/odoo#61491
X-original-commit: c4e1cfc527cf65fdad201b77e54bf7027b8dd6c2
Related: odoo/enterprise#14639
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
We extract the `price_unit` and `tax_ids` recomputation logic from the
`_onchange_product_id` method. This way, it can be called
programmatically.
opw-2371934
closesodoo/odoo#61477
X-original-commit: ca6f25bef45137c032bc5cafd336c3f16a97a929
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Behavior prior to this commit:
When editing a lead, if we log a note, it will refresh the record and
cause the changes to be lost. In version 13, it would only refresh the
record if `@` mentions were added.
Behavior after this commit:
The record will only refresh if it is not dirty.
Note:
It is not clear why the record would in fact ever need to refresh
as there is no visible change on the lead form when a note is logged,
whether or not followers are added (the message thread, which shows the
number of followers, refreshes regardless). In this commit I chose the
approach which would cause the least change. There is still a need for
a longer term solution to orchestrate the refreshes, which will take
place once the rest of the web application is converted to use Owl.
opw-2369162
closesodoo/odoo#61503
X-original-commit: 6d7058679869ba03e164993687c21b0bae12822d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
Create and post an invoice ('Lock Posted Entries with Hash' on the
journal)
Edit also Bank journal enabling 'Lock Posted Entries with Hash'
Create and post a corresponding bank statement:
- same setting on the journal
- same partner on the line
Reconcile
Action will be blocked because the system try to
rewrite the partner on the posted line which is locked.
For Bank/Cash journals should not be visible the lock setting.
opw-2367688
closesodoo/odoo#61284
X-original-commit: d7f92cabb4bb12fe40356c9764c8e3e7c75e4f37
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The order to find when to reset the sequence needs to be the following:
* find a sequence used before the date of this move
* if there isn't any, find the sequence of any move
Because we were not looking at the second step for bank statements, we
could have an issue since we were not checking the sequence relative to
the correct date.
closesodoo/odoo#61495
X-original-commit: b863b9cfedb3e7b4d1e3d409c829ffa0bfa1d9bb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
When you make a payment, if a supplier have multi bank account, the bank name is not show in the selection. With the bank name it is more simple to find the good bank account.
closesodoo/odoo#51930
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Usecase to reproduce:
- Rule from WH/A -> WH/B as automatique no step added
- Rule from WH/B -> WH/C as transfer created
Do a move that goes to WH/A and confirm it. It's destination location
is correctly set to WH/B but the internal transfer from WH/B to WH/C
is not created.
It's due to the avoid loop location that returns always true due to
code removed in commit 1d36fb428fclosesodoo/odoo#61488
X-original-commit: b2a07e4d08beff360ac1e6c95d240a15b1081855
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, the value of data-oe-shape-data required double
quotes to be properly parsed in JSON in the getShapeData method.
After this commit, we also allow single quotes to prevent issue if
someone doesn't use double quotes in the the value of
data-oe-shape-data. Which was precisely the case in one of the themes
and this is why this commit is a fix.
task-2327741
closesodoo/odoo#61487
X-original-commit: 10ac750aaecf502500dc08966f4642a8604a685b
Related: odoo/design-themes#423
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Add a margin bottom on snippet buttons. So when there are 2 buttons (or
more) on the same line, we have a space between them on small devices
when displayed vertically.
task-2327741
closesodoo/odoo#61484
X-original-commit: 9db7b9bdbd86405fdfe2c0efccebea780b7ffb63
Related: odoo/design-themes#422
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue
- Install "Approvals"
- Submit new approval with you as "Request Owner"
- Click on "View Approval Request" in your mailbox
The link redirects to a 505 error
Cause
The model is not the correct one and the res_id is undefined
Solution
Specify the model and the res_id to _notify_get_action_link
when creating the link with kwargs
opw-2358846
closesodoo/odoo#61478
X-original-commit: 075325226d6f7c2af638013f25613ddd391e506b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
This change of style is a special request from FP: full width, full
height, no <sheet>, no resizer.
I did end up using a <sheet> and restyling it specially for note because
the styles that allow us to have the note next to chatter is too
intricately linked to the style of the sheet in form view to make it
safe to remove the sheet. Indeed, fully removing the sheet implied
duplicating a lot of css from community and enterprise alike. This way
is the least intrusive even though semantically unsound.
closesodoo/odoo#61405
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Issue
- Open any opportunity
- Go to "Extra Information" and click on "Campaign" field
- try to create new campaign
Traceback is raised
Cause
"self.ids" is empty and the "tuple(self.ids)" on the SQL query return "()"
Solution
Initialize campaign field with default values
opw-2376082
closesodoo/odoo#61476
X-original-commit: 5797be02e32e68e0a188bfdc8b85068fb8fa5435
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Steps to reproduce the bug:
- CRM--> Configuration --> Tags
- Delete the tag "No more partner available"
- CRM --> Lead --> Automatic Assignment
Bug:
It will raise Traceback
`AttributeError: 'NoneType' object has no attribute 'id'`
as Tag is not Present.
With this Commit:
It will add Tag if it exists on database.
closesodoo/odoo#61470
X-original-commit: 631030ae179c65ae0d99603046b5a09ffe00c408
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We need to ensure the name stays consitent with the journal_id and the
date when we try to change one of those fields.
X-original-commit: 634aaeeac36d2371743338536466a0bcc9ad6c69
* on image remove was removing two images instead of one -> fixed
* reactivate the image adder helper if you manually remove the last image
----
bug report :
[QSM] Images wall snippet -> Add images -> click on one -> Delete via the trash icon button on the overlay -> Sometimes (most of the time) delete 2 images instead of the selected one
closesodoo/odoo#61462
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>