Commit Graph
6291 Commits
Author SHA1 Message Date
Martin TrigauxandXavier Morel 49838338e0 [FIX] *: sanitize action content reading
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.

closes odoo/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>
2020-11-10 16:04:29 +00:00
mir-odoo e9638fd3ae [IMP] crm,purchase: Improve the reporting menu
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>
2020-11-05 11:00:27 +00:00
svs-odoo ddbc10f8b1 [REM] purchase: remove unused import
closes odoo/odoo#61291

X-original-commit: d4d06b47c58b82a4757d56ffcdfc11a2d01b3ea1
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-11-03 16:19:12 +00:00
svs-odoo ccee9eaf8c [FIX] purchase: purchase order sort order
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
2020-11-03 16:19:12 +00:00
Rémy Voet (ryv) 725232bb1a [FIX] purchase: fix bug in purchase list overview
In the overview of purchase, click on "To Send" will raise a traceback.
Fix the clean of 2d2783d7ee .

task-2372196

closes odoo/odoo#60916

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-29 10:06:56 +00:00
IEL 3c7694b409 [FIX] *: fix image parsing error on saving res config
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

closes odoo/odoo#61215

X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 18:25:20 +00:00
Goffin Simon c11179b0b4 [FIX] purchase: Smart button in contact view form
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

closes odoo/odoo#61167

X-original-commit: b3e31f2680534382b048324cfcb8a6f6c457553f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-02 14:04:26 +00:00
yhu-odoo 6991ee3a91 [IMP] purchase: show delivery lead time on product form
In the purchase page of the product form, show Delivery Lead Time by
default.

Task 2357198

closes odoo/odoo#60923

X-original-commit: d107532fb65c9dd78a82c16646d0659a49495ec6
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-28 16:37:06 +00:00
yhu-odoo 5d1eaeb817 [FIX] purchase: Delivery Lead Time not working
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
2020-10-28 16:37:05 +00:00
JF Aubert c7debd2edb [IMP] stock : Improve general usability
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

closes odoo/odoo#57036

Related: odoo/enterprise#12926
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-08 09:10:51 +00:00
Nicolas Martinelli 691c14c070 [FIX] account, purchase, sale: portal access error
- 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

closes odoo/odoo#60849

X-original-commit: 54ef98c613219aba3bda41817f7767261b8092d2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-27 15:36:48 +00:00
Swapnesh Shah 1e9de61d81 [FIX] purchase: confirm receipt date if needed
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 #60222

closes odoo/odoo#60723

X-original-commit: 6f37f489b065d5534709c0eaf6c647ab5ad469df
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-26 11:01:05 +00:00
Swapnesh Shah b07f2d31d2 [FIX] *: update document links
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).

closes odoo/odoo#60228

X-original-commit: 7ac08486d91d0ff0151abeeda057ffa6beda72e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-19 07:03:01 +00:00
Adrian Torres b7017e58cc [FIX] *: adapt business code to function-redefined error
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.
2020-10-16 12:56:52 +00:00
William Henrotin f27369f757 [FIX] purchase(_stock): track qty_received changes
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.

closes odoo/odoo#60067

X-original-commit: 3d592649970df3d755ccb57d68c074acdff67894
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-15 10:14:01 +00:00
Simon Lejeune ffdc64a57d [REM] stock,mrp,purchase: outdated documentation
An updated and user friendly documentation is available at
https://www.odoo.com/documentation/user/14.0

closes odoo/odoo#46185

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-15 09:20:05 +00:00
Swapnesh Shah 1cede5bcd4 [FIX] purchase: hide send reminder on unsaved record
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 #58744

closes odoo/odoo#59972

X-original-commit: 3cb26da782042ee391777ed15bcca4eef4a10677
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-14 10:34:13 +00:00
yhu-odoo 6424025b65 [FIX] purchase: don't send preview email when PO not saved
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 #57961

closes odoo/odoo#59399

X-original-commit: 83f2cac4b8ba101d6a7736a8ff408a3fdb5422fe
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-12 09:48:24 +00:00
Rémy Voet (ryv) 89a597761f [FIX] purchase: fix state of extra product
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 #59664

closes odoo/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>
2020-10-12 10:16:04 +00:00
yhu-odoo 9547813e8e [FIX] purchase_stock: compare only date in on-time delivery
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 #58653

closes odoo/odoo#59386

X-original-commit: 86af7c647fe56f776c6cebc22dd5856577878980
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-07 10:35:37 +00:00
IEL 41471bb0ab [FIX] purchase: always switch to vendor's currency on creating a bill
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

closes odoo/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>
2020-10-05 18:07:49 +00:00
Martin Trigaux e79531c136 [I18N] *: export 14.0 source terms
Including demo data this time

closes odoo/odoo#58862

X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-29 17:52:02 +00:00
Goffin Simon 47020806de [FIX] purchase: Amount_tax not updated
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

closes odoo/odoo#58912

X-original-commit: d7598086b8ac642f2cfe497ab6e33e380edb244a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-09-30 17:51:12 +00:00
Rémy Voet (ryv) 2d2783d7ee [REF] purchase: little refactor purchase dashboard
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.

closes odoo/odoo#56211

Related: odoo/upgrade#1704
Related: odoo/enterprise#12553
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-17 12:11:01 +00:00
AaronHForgeFlow 65094a3af7 [FIX] purchase: typo in security rule name
Closes #57616

closes odoo/odoo#57860

X-original-commit: 4c78b85aa65ffef0e1d8385b626c91c468593ea6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-16 14:04:31 +00:00
yhu-odoo 9cb19f3624 [IMP] purchase: add address of the company in protal
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 #

closes odoo/odoo#57651

X-original-commit: 2081048662c219a181d7309307f021f02fb43739
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-14 13:04:45 +00:00
Mathieu Duckerts-Antoine e56a095f16 [FIX] *: disable linking on some graph views
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

closes odoo/odoo#57622

X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5
Related: odoo/enterprise#13192
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-14 10:01:49 +00:00
Jorge Luis Juarez 766c7c3840 [IMP] purchase: add hook method
Add a method containing the information to create the supplier information

closes odoo/odoo#56171

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-04 13:38:30 +00:00
yhu-odoo 81f86adf1f [IMP] stock,mrp,product,pruchase,repair: improve empty screen
Improve empty screen, add sample data.

Task 2310494
PR #55910

X-original-commit: 762457f1edd84208f43bd85de6be7316cfd20780
2020-09-09 10:15:32 +00:00
Victor Feyens 2da7bc2adb [REM] portal, *: remove archive_groups dead code
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 #12368

closes odoo/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>
2020-09-01 10:30:32 +00:00
Victor Feyens 40fb37b943 [FIX] various: enforce currency presence for monetary widgets
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
2020-09-03 08:45:22 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
svs-odoo 416160ece8 [FIX] purchase: noupdate demo data
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
2020-08-27 13:34:55 +00:00
Tiffany Chang (tic) 1d67f0583e [FIX] purchase(_stock): make orderpoint qtys depend on POs
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

closes odoo/odoo#56625

Closes: odoo/odoo#56625
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-08-27 07:22:38 +00:00
Dharmraj Jhala f49dbf595c [IMP] account, purchase, sale: allow sending email to self
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

closes odoo/odoo#56370

X-original-commit: 08c0dc929da38595e29a9d1db93065547cd98ad1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 08:14:44 +00:00
Barad Mahendra 30adc183f8 [IMP] *: set sample="1" on reporting view archs
The purpose of this commit is to enable sample data on various graph and
pivot views.

Task ID: 2319606

closes odoo/odoo#55917

Related: odoo/enterprise#12415
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-18 14:24:10 +00:00
Raphael Collet 1f48130d2b [REF] core: _name_search() now returns a list of ids
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.
2020-08-18 13:02:41 +00:00
Rémy Voet (ryv) 8d62eacfff [FIX] *stock*, mrp: fix effective_date
- 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

closes odoo/odoo#55379

Related: odoo/upgrade#1586
Related: odoo/enterprise#12309
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-08-18 07:48:27 +00:00
Rémy Voet (ryv) 57f805f71e [IMP] stock*,mrp*: Dates Refactor
- 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
2020-08-18 07:48:27 +00:00
Rémy Voet (ryv) e40553723b [IMP] stock,mrp,purchase: refactor priority
- 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
2020-08-18 07:48:27 +00:00
Jeremy Kersten 73b4e9b1b6 [IMP] portal,*: /my counter async
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.

closes odoo/odoo#55999

Related: odoo/enterprise#12456
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-17 15:59:03 +00:00
Martin Trigaux 6156f98288 [FIX] *: adapt action content retrieval
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.*
2020-08-17 09:09:02 +00:00
Barad Mahendra 00a7f3aaad [IMP] various: Reseuence the module and module category
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/12413
Closes: #55907
2020-08-14 07:38:58 +00:00
Florian Gilbert 65bf6988f9 [FIX & IMP] purchase: Remove weird domain in attrs & add purchase order on account move line.
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

closes odoo/odoo#55611

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-14 12:02:38 +00:00
Anousone Phaysomphot d1d11b33a6 [IMP] purchase: add new digest tips
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
2020-08-12 12:23:01 +00:00
Barad Mahendra 63f239163a [IMP] *: set sample="1" on various graph archs
The purpose of this commit is to enable sample data in various
graph views.

TaskID: 2311486
2020-08-12 09:57:09 +00:00
Aaron Bohy 06b8af3212 [REF] web,purchase: SampleServer: mock registry
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
2020-08-12 08:52:20 +00:00
yhu-odoo c531cb0591 [FIX] stock, mrp, purchase: improvement and fix bugs
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 #55155

closes odoo/odoo#55740

Related: odoo/enterprise#12344
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-08-11 12:22:22 +00:00
jvm-odoo 7b51aaa1ca [FIX] purchase: fix bill ref replaced by PO ref when using auto complete
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

closes odoo/odoo#55560

X-original-commit: ae0c3b600403a21a196e51ce88fa6b25990f2b64
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-06 13:11:22 +00:00
william 82dc0cb7b9 [IMP] account: soft post entries in the future
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,... )
2020-08-05 11:57:10 +00:00