The open_action_with_context was not using _for_xml_id, producing an
error when reading the action content.
In open_action, the action_name was taken from the context and needs
sanity checks. Ensure only actions from the account module can be
read and only if the user has access to the target model.
This is a limitation of the previous behaviour but, at the moment, all
known calls are made refering to an action from the account module.
Limit the scope of this method while the 14.0 is still early to avoid
having a door open to ready any action, and difficult to close later.
Remove old action fetching from the context in create_move that is no
longer used.
closesodoo/odoo#61602
X-original-commit: a39e94f7e4dc74e850650ac90bbc5f85af130bc8
Related: odoo/enterprise#14695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Xavier Morel <xmo@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>
Removes the field `date_order` from the `purchase.order` order because
it tends to make the feeling the PO's sort order is kind of random.
task-2367965
X-original-commit: 4cd45b5baa2d78b059e14fbb61298dcdccacf040
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus
WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
it may lead to image dissapearing or "Incorrect padding" error
HOW:
find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
git checkout -- addons/base_setup/views/res_config_settings_views.xml
---
PR for General Settings: https://github.com/odoo/odoo/pull/47297
opw-2346644
closesodoo/odoo#61215
X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Steps to reproduce the bug:
- Let's consider a company contact C with two children CH1 and CH2
- Create a purchase order for CH1 and a subscription for CH2
- Archive CH1 and CH2
Bug:
The count of purchase orders in C was displaying 0 instead of 2
Same issue for the vendor bills
opw:2360155
closesodoo/odoo#61167
X-original-commit: b3e31f2680534382b048324cfcb8a6f6c457553f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
In the purchase page of the product form, show Delivery Lead Time by
default.
Task 2357198
closesodoo/odoo#60923
X-original-commit: d107532fb65c9dd78a82c16646d0659a49495ec6
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Currently the delivery date on PO line will always be set to today if
there is no receipt date on PO, which makes the delivery lead time not
working. Fixed this issue in this commit.
Task 2357198
X-original-commit: 147aa4c67fb912a2e62dd8be1fc770db258e28d0
Purchase
- When a RFQ is in "To Approve" stage, on the printed pdf, keep "Request for Quotation" as a title
- "Send Reminder" action should open the composer when triggered manually.
Inventory
- In tree view of transfer, set date_done optional = hide
- In (mobile) picking view, replace button text with 'add a product'
- fix Vendor Group by in Replenishment report
- Warning message when changing product tracking from untracked to tracked
MRP
- Reporting > Manufacturing Orders : change measure for total quantity grouped by scheduled date = month and by product
- Reporting > Work Orders : change measure for Duration per unit grouped by workcenter and by product & add unit (minutes)
- Reporting > Overall equipment effectiveness : group by loss reason added to the current group by workcenter
closesodoo/odoo#57036
Related: odoo/enterprise#12926
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
- Install account / purchase / sale
- Ceate an internal user without any access rights
- Go to `/my`
A 500 error is raised because of an AccessError.
When the user has no access rights to any of the mentioned applications,
the `search` call returns an AccessError.
We prevent the access error and return 0 as a fallback.
opw-2367559
closesodoo/odoo#60849
X-original-commit: 54ef98c613219aba3bda41817f7767261b8092d2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, There would be Traceback (AttributeError: 'bool' object has no attribute 'date')
on `Confirm Receipt Date` If order has no `Receipt Date`.
Now, Button `Confirm Receipt Date` will be hidden if there is not `Receipt Date` to confirm.
Closed#60222closesodoo/odoo#60723
X-original-commit: 6f37f489b065d5534709c0eaf6c647ab5ad469df
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.
Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-> /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).
closesodoo/odoo#60228
X-original-commit: 7ac08486d91d0ff0151abeeda057ffa6beda72e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit adapts the business code in which
class/module/function/method redefinition took place so that it no
longer happens and the pylint test passes.
Commit 0f80e69b8d tracked all changes on
qty_received on the purchase order. But did that wrongly by calling
`write` inside a compute.
Commit b7cc3b068f685d1339f9fe7e47d0c564de1708e7 fixed this `write`
by an `=` to avoid error when the compute is called on virtual records.
This fix result on forgetting to track the quantity delivered.
This commit sends a message to post in `write` AND in the
`compute_qty_received` to be sure it is posted. This way, we do not call
write in compute anymore.
closesodoo/odoo#60067
X-original-commit: 3d592649970df3d755ccb57d68c074acdff67894
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Before this commit, Button to Send Sample reminder was always visible which doesn't makes sense as It would work on saved record only.
Now Button will be hidden on unsaved record.
Fixes#58744closesodoo/odoo#59972
X-original-commit: 3cb26da782042ee391777ed15bcca4eef4a10677
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
When PO not saved, no mail can be send. Sending a reminder preview will
get traceback. In this commit, we check if the PO is saved before
sending the mail.
Also clean some useless code in the send_reminder_preview() and fix the
issue when no json object is return to the widget because of on mail
send.
Task 2339431
PR #57961closesodoo/odoo#59399
X-original-commit: 83f2cac4b8ba101d6a7736a8ff408a3fdb5422fe
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
As explained in issues-59664, the commit
f18bdc4fcf2b6b0bdb7699c3b2aa38d332301a84 add
readonly attribute in the `purchase.order.line` state field
to avoid to save bad `state` in the server (then the state of the
PO line != PO line).
But it breaks the feature to add product
when the PO is already confirm (the state will be 'purchase' and the
`product_id` is readonly when state == 'purchase').
To fix both issues, add a `default_state` in the context.
It will "bypass" the attrs of `product_id` and the state of PO
('draft') line won't be save because it is readonly.
resolve#59664closesodoo/odoo#59729
X-original-commit: 74780e95a2a3db9d9875aea7e644bf064ecf6b46
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Previously, when compute on-time delivery, we compare the date_planned
on PO line with the date on stock.move. Since they are both datetime,
the product that delivered on the scheduled date may be considered delay
because of the 'time' part is late, which is normally not what we want.
In this commit, we only compare the date part of them to decide whether
it's late or not.
Task 2346121
PR #58653closesodoo/odoo#59386
X-original-commit: 86af7c647fe56f776c6cebc22dd5856577878980
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit vendor's currency wasn't used on creating an invoice if there
is default journal in context. As I understand, the idea was to let onchange("journal_id")
handler to update the currency. It works well, if journal has the same currency
as specified in vendor record (res.partner). But it confuse users in following
scenario:
* there is just one vendor journal
* vendor is configured to invoice in another currency
* then, if you create invoice via "Accounting >> Overview >> Vendor Bills", it
would have journal's currency
* while, if you create invoice via "Accounting >> Vendor >> Bills", it
would have vendor's currency
This commit force to switch to vendor's currency on changing vendor field, even
if it differs from journal's currency. If after changing vendor, you set another
journal, then journal's currency is used (thanks to onchange("journal_id") handler)
opw-2339966
closesodoo/odoo#59162
X-original-commit: 513cc1abe121cd05623be1a6519239f8f4b3fb48
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Including demo data this time
closesodoo/odoo#58862
X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Steps to reproduce the bug:
- Create a purchase order P with one line L
- Set a tax of 10%, a quantity of 1 and a unit price of 100€ on L
- Save P
- Edit P and change the unit price of L to 120€
Bug:
The amount_tax was not updated until you saved
opw:2341757
closesodoo/odoo#58912
X-original-commit: d7598086b8ac642f2cfe497ab6e33e380edb244a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
To avoid dynamically building xml_id names,
in the purchase dashboard, remove the name attr used to
construct dynamically the action xml_id.
In any case, it was all the same, then just put it in the js.
closesodoo/odoo#56211
Related: odoo/upgrade#1704
Related: odoo/enterprise#12553
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Add the address in purchase protal so that when in a multiple company
environment, the user can see which company the purchase order comes
from.
Task 2328169
PR #
closesodoo/odoo#57651
X-original-commit: 2081048662c219a181d7309307f021f02fb43739
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
For the graph views based on reporting models (e.g sale.report), click
on a group in the chart redirects the user to an "empty" list view. Here
we use the attribute disable_linking to avoid that redirection for those
views.
Task ID: 2336960
closesodoo/odoo#57622
X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5
Related: odoo/enterprise#13192
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
PURPOSE
Clean code and be and more performance oriented.
SPECIFICATIONS
Various portal pages hold references to archive_groups. It was a summary
of customer documents for portal, containing a count of all documents split
by model.
Currently its computation is not used. Indeed archive_groups is displayed
only in 'my_details' page that does not hold any document-based reference
or code call. Other calls to archive_groups are dead code as the result is
not used. Since 13.0 it is even not computed on standard pages to speedup
their load (as it was not used).
It is not used anymore and its computation and references can be removed
safely, especially with v14 in mind for which we want to remove dead code
to maintain.
Followup of odoo/odoo#55228
LINKS
Task ID-2329081
PR odoo/odoo#55800
PR #12368closesodoo/odoo#56859
X-original-commit: e75086000ee4317b2ad2994db5d906fbcbd5081f
Related: odoo/enterprise#12830
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
When a field is specified as widget="monetary" it makes sense to have the
currency actually shows. It won't happen if currency field is not present
within the view.
An heuristic to detect missing currency field presence when using monetary
fields or monetary widget tag will land soon in master. As this commit targets
a stable version only view fixes are provided.
Task ID-2329114
PR #56946
X-original-commit: 9c1c848ad1e8fef11320e2a162b008de7e304bcb
Before this commit, creation of demo data purchase order wasn't into the
`noupdate` tag. So, if one of these records is manually deleted, then
purchase is updated, the record will be created again.
X-original-commit: d514f8dbbbacef58ce7ec1981e5ed321f6cf3bb4
Before this commit, `stock.warehouse.orderpoint` `_compute_qty` didn't
depend on `purchase.order.line` (POL). This means when a relevant POL
was edited/cancelled, then the `qty_forecast` wouldn't correctly update.
To reproduce:
- Create a product w/ a vendor and buy route active,
- Go to replenishment report, create a reordering rule, and hit
order for product (RFQ should be created)
- Cancel the RFQ and go back to replenishment report
The product should reappear in the list view, but does not because it's
`qty_forecast` has not updated and therefore has not updated
corresponding `qty_to_order` value.
Note string rename of `purchase_line_warn` 'Purchase Order Line' =>
'Purchase Order Line Warning' is due to repeat label use issue. It is
better to rename the poorly labeled `purchase_line_warn` than to give a
hacky label for new One2many field.
Task: 2285912
Manual forward port of: odoo/odoo#56580 due to migration test error
closesodoo/odoo#56625Closes: odoo/odoo#56625
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Currently, if users try to send invoices / quotations / purchase orders to
themselves in order to look at final result, they can't do so because our
default chatter protection prevents sending mails to authors themselves.
This commit uses 'mail_notify_author' context key and allows users to send
mails from the header buttons available on SO / PO / invoices to themselves
if they are in recipients.
This commit targets only those buttons as this is the main case where we
want to allow people to send emails to themselves. In order to avoid
side effects no other use case is supported.
Task ID-2294130
closesodoo/odoo#56370
X-original-commit: 08c0dc929da38595e29a9d1db93065547cd98ad1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This provides a better API to search for records by name without the
formatting part (`display_name`).
This also simplifies all the overridings of `_name_search` that no
longer need to call `name_get()`. The call to `name_get()` is done in
method `name_search` in a generic way.
- Avoid to truncate the hour/min/sec in the computation of the
effective date which is related to the `date_done`
of the first incoming picking.
- With manufacturing in 3-step (pbm_sam), the store picking
had a source document == "New". It was the case because
the `_get_move_finished_values` was call before the create
and the name is set only on create.
To fix this issue, during the `create` set the origin of all move.
- To avoid to maintain old views unused,
remove unused view of stock move.
- The computation of the products_availability json is too expensive
to be in tree view (2.5 times long with it) of picking.
It will be hard to optimize because the half the time
is due to _get_report_lines method - already in batch (on 80 records).
- Review buttons of the replenishment list to be more Odooer.
- In some cases the delay alert date was wrongly compute:
- If we new dest_move_ids of a existant move, the delay alert date
won't be compute.
- If the state (to done) and the date are save in same write call
the alert date of next move won't be reset.
To avoids these issues, refactor the alert date to be a compute stored
fields.
- To avoid any confusion between date expected in the replenishement
(in date) and the purchase order receipt date (datetime),
we put the receipt date at the middle of the day.
Also On-Time Delivery Rate computation counts
only when date are bigger effective date trunced to date.
Also used the timezone of the company by default (if not user timezone)
task-2246665
closesodoo/odoo#55379
Related: odoo/upgrade#1586
Related: odoo/enterprise#12309
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
- The deadline of MO generated via procurements is calculated differently.
Now, it doesn't take anymore in account the manufacturing_lead
of the company (Security Lead Time of MO). The computation of planned date remains unchanged.
- The date_expected fields was duplicated with the date fields
except when the move was done. Merge both fields.
The only information lost is: we can't know what was the
scheduled date before processing move (`state` == done).
Indeed, the date becomes the actual move processing datetime.
- The `date` in `stock.picking` field contained the time of
(purchase) order `date_order` (`purchase.order`).
This field is was wrongly used in the kanban view where we
expected to see date_planned instead. Also, the `_order` used
this date instead of date_planned too.
- The `delay_alert` is activate independently of stock rules.
Then it is now activate in all case.
- Remove the auto-reschedulting process of stock move via
the stock rule (`propagate_date` and `propagate_date_minimum_delta`).
Replace it by a automatic deadline date (`date_deadline`) propagation.
The deadline is the promise done to/by vendor/client (SO/PO)
then it is a readonly fields on picking/move and MO.
- Now the Scheduled date (`date`) of stock move is never propagate
and it is only related to the Scheduled date of
related document (MO or picking).
- Now when a move is created from procurement (sale),
`date_planned` = `date_deadline` - `security_lead`.
- The `delivery_date` of sale is no editable after confirmation
and propagate as the deadline to related stock move linked to order_line
- Adapt filter and decoration of MO and picking.
- Because we are the client in case of purchase (PO), the promise of vendor
can be not respected. Then we add the lead security to the deadline
(inverse the sale order logic) of PO picking (promise reciept date
+ security lead) to match with the replenishment.
task-2246665
- MO/picking/PO/stock.move have now the "same" `priority` fields
(Boolean logic: Normal or Urgent).
These models are now sort by priority first. Note that the priority field of
stock move is a technical one.
- For MO and picking, the set of `priority` field change priority of
the related stock move. The prioriry field on stock move is
used by the scheduler for reservation ('Urgent' before 'Normal')
- The Stock Replenishment Report also take in account the priority
to be consistent with the reservation.
task-2246665
Before this commit, the time to compute all counters was making the rendering
of the portal page slow.
Now the count is done in rpc after the loading of the page.
Now you can decide which part you want to show on the portal, and only compute
for these one.
It is not because you have purchase installed for your internal process, that
it means that your supplier use your portal and it avoid the computation for
all end users.
We parallelize the counters in arbitrary 3 rpcs.
closesodoo/odoo#55999
Related: odoo/enterprise#12456
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
The purpose of this task is to improve the UI of the 'Apps', by
improving the clarity of the kanban, sequencing the apps and
simplifying the app categories in the searchpanel
So in this commit, Added the new sequences for ir.module.module
and ir.module.category records.
TaskID: 2240257
Related Enterprise: https://github.com/odoo/enterprise/pull/12413Closes: #55907
This commit removes "state = purchase" in account move attrs domain. The purchase state doesn't exist.
This commit adds a related field to purchase order in account move line.
Task ID: 2312024
closesodoo/odoo#55611
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
PURPOSE
Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.
SPECIFICATIONS
“How to keep late receipts under control?”
“Never miss a purchase order”
See code for specifications.
LINKS
Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139
X-original-commit: 9cab3aea9a06e442f37329d350e9ecec41ca4911
This commit changes the API of the SampleServer's mock
registry s.t. one can register a mocked version of a method,
whatever the model. The former API required a specific
model to be specified, and only applied on this model.
However, in order to enable the sample data feature on the
cohort view, the 'get_cohort_data' method needs to be
mocked, whatever the concerned model.
One can now register mocked methods for a specific
model only (with key 'model/method') or for every
models (with key 'method').
Task ID: 2282196
In stock:
1. remove string of action_show_details button, only show icon
2. late filer have been megered with planning issues filer,
update the name. (also in mrp)
3. add width to json_lead_days_popover field to show it properly
4. change inventory adjustment empty screen image.
In purchase:
1. in reminder mail, show "undefined" when no date. This will
only be shown in preview. When no date, we won't send reminder mail to
the vendor.
2. remove old book icon for document in setting.
3. check if there is date_planned when craete a confirm date url
4. RFQs late filter now show all late RFQs with in state "draft",
"sent", and "to approve".
5. improve the the words in KIP and empty screen and list view
Task 2298950
PR #55155closesodoo/odoo#55740
Related: odoo/enterprise#12344
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Issue
- Accounting & Purchase
- Create a PO for wood corner
- Create a bill for wood corner, add a ref
and auto complete with the previous PO
The ref is replaced by the PO's one
Cause
In purchase account_invoice _onchange_purchase_auto_complete
we update all the bill values with the PO values including
the PO ref (empty or not)
Solution
Exclude the ref of fields to be updated
OPW-2313418
closesodoo/odoo#55560
X-original-commit: ae0c3b600403a21a196e51ce88fa6b25990f2b64
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Add an easy way to not post the entries in the future when calling
post() on it, but rather set it to be auto-posted at accounting date.
This is useful when we are creating a lot of entries in batch and some
might be in the future, some in the past, and we don't want to separate
that in two batch every time. (asset, accrual, transfer,... )