Commit Graph
1222 Commits
Author SHA1 Message Date
Goffin Simon 3e9f516b8a [FIX] stock: Running scheduler doesn't update
When running the scheduler, the informations in the inventory dashbord were not updated.

opw:2486591

closes odoo/odoo#68604

X-original-commit: 0d15ee3c9c5ebf98d604c331b8c97d01ced58f49
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-31 14:05:26 +00:00
Arnold Moyaux bdcb3d192b [REF] stock: move stock.inventory feature into stock.quant
This commit removes stock.inventory(.line) and moves its general
functionality into stock.quant. Some features are lost during this
switch as well.

Feature Additions:
- New single list view for inventory adjustments (no more multiple
  inventory adjustment records to keep track of!)
- Improved cyclic counts (annual inventory day setting) + next inventory
  dates are immediately viewable in view (vs auto-generated inventories
  based only on location)
- Specific quants (i.e. counts) can be assigned to users for more
  flexibility (vs only able to restrict by location + product
  combinations)
- Counts can be requested (i.e. bulk assigned to user/for a specific
  inventory date)

Feature Removals:
- Can no longer look at previous inventory adjustments linked to a
  specific record. Each quant has a history button to show inventory
  related moves. [relevant account moves are also now harder to see via
  stock as well]

Other changes:
- Bulk of changes were for demo/test
- Some changes were done to ensure "Update Quantity"/"Inventory Report"
  views still mainly function the same as before with the exception of a
  new column added to support updating quant quantities in these views.

Task: 2440026
ENT PR: odoo/enterprise#17329
Upgrade PR: odoo/upgrade#2326

closes odoo/odoo#68409

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-02 11:51:38 +00:00
Rémy Voet (ryv) bec794f776 [REF] stock,purchase(_*),mrp: clean related fields
Related fields are by default readonly and they should be when it
is possible. A editable related field will write on the related
model and will cause extra unwanted write of data. These unwanted write
can cause performance issues in some case (see odoo/odoo#63865).

Then remove the `readonly=False` of some related fields
(where it is useless):

- In 'mrp.workorder' (mrp): `working_state` and `production_date`
should be readonly.
- In 'purchase.order' (purchase): `product_id` should be readonly.
- In 'purchase.order.line' (purchase): `state` should be readonly.
- In 'product.supplierinfo' (purchase_requisition):
`purchase_requisition_id` should be readonly.
- In 'purchase.requisition' (purchase_requisition):
`product_id` should be readonly.
- In 'product.template' (stock):
`route_from_categ_ids` should be readonly.
- In 'stock.move.line' (stock):
`is_initial_demand_editable` should be readonly.
- In 'stock.move' (stock):
`product_tmpl_id` should be readonly.
- In 'stock.production.lot' (stock):
`product_uom_id` should be readonly.
- In 'stock.quant' (stock):
`product_tmpl_id` should be readonly.
- In 'stock.rule' (stock):
`route_sequence` should be readonly.
- In 'stock.change.product.qty' (stock):
`product_variant_count` should be readonly.
- In 'stock.return.picking.line' (stock):
`uom_id` should be readonly and also because it
is forced by `_prepare_stock_return_picking_line_vals_from_move`,
it should be related to the product uom not the one on the move.

task-2424248
2021-01-21 11:09:58 +00:00
Andrea Grazioso (agr-odoo) 31029cc8c2 [FIX] stock: add partner info in return svl
Have a product category Inventory Valuation Automatic
Create a SO and deliver the product in such category
Create return and validate

In Journal Entry the accounting move related to return will not have
partner id

opw-2421393

closes odoo/odoo#64764

X-original-commit: 1d4460bcc80e31e9198b19502951d68b447a136a
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-19 17:19:21 +00:00
Andrea Grazioso (agr-odoo) f365f1de42 [FIX] stock: fix quantity on return chain
Create a sale order for a stored product, save and confirm.
Validate delivery
Return and validate.
Return (the return, so delivery again) and validate.
Try return again.

The quantity to return in the widget will be 0.
Attempting to fix manually will worsen the situation creating negative
quantities on further action.

This occur because when creating the return the system tries to identity
other sibling return moves to set the correct quantity
This commit fine tunes 73de0645b730e1f1183b7c770e878b4c4ff1e0f1 aiming
to collect quantities only on actual sibling returns (moves sharing the
same parent)

opw-2379663

closes odoo/odoo#62169

X-original-commit: fe8c6db1323061f3e6a0fd3f8b294ea6ddb86acf
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-11-23 12:18:15 +00:00
Martin Trigaux 2683184aa6 [FIX] *: fix all the typos
And other reported English mistakes in source string
Courtesy of Transifex translators

And remove leftover from gengo

closes odoo/odoo#59022

X-original-commit: 26efc84c5cac47a2cc83d7b084f8b71528fec6c7
Related: odoo/enterprise#13781
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-05 09:36:34 +00:00
Tiffany Chang (tic) 58316d1546 [IMP] delivery, stock(_picking_batch): add "Put In Pack" button
This commit sets up the logic and adds the button for "Put in Pack"
action that already exists in stock.picking. Reuse/extension of logic
from stock.picking reused where possible, including extension of pack
wizard to handle products with different destination.

Note that logic to handle "Delivery Packaging" wizard when "Delivery
Methods" is active was purposely not extended to work correctly in batch
pickings due to complexity of adding in a new module just to handle
conflicting carrier_ids across pickings in the same batch. It is
expected that this use case will not occur except in case of user error.

Additionally, stock.picking implementation of 'put_in_pack' method has
been renamed to 'action_put_in_pack' to have consistent naming (and
support enterprise level code).

Part of "1. Improve Batch Pickings" specification of overall barcode
improvements task.

Task: 1884520
Enterprise PR: odoo/enterprise#12086

Closes: odoo/odoo#55096
2020-08-20 15:06:08 +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
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
svs-odoo 56eb3f3599 [FIX] stock: default warehouse in replenish wizard
Before this commit, passing the `default_warehouse_id` in the context
has no effect with the product replenish wizard because the warehouse id
was overrided in the `default_get`.
2020-07-31 12:36:54 +00:00
Xavier Morel 6835aeb0de [REM] core, *: deprecate <act_window> and <report>
Convert deprecated tags through the codebase.
2020-07-28 13:03:13 +00:00
Victor Feyens 07bafcb792 [IMP] stock: correct default_get behavior
Leave the management of default_* context keys to the orm level.

closes odoo/odoo#54246

Related: odoo/enterprise#11754
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-23 16:38:17 +00:00
Simon Lejeune 5adb0463ea [FIX] stock: default quantity to return
The code was wrongly always taking the reserved quantity on the already
returned moves, but if they're done their value is zero.

task-2291973

closes odoo/odoo#54807

X-original-commit: 7b08f0ae0a39e8f575b21e744de16264b6365704
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-23 08:00:08 +00:00
Nicolas Martinelli 536759644e [FIX] stock: reserved quantity on return of return
1. Activate receipt in 2 steps
2. Make a PO of 10
3. Receive 8 (pick 1), backorder
4. Receive 2 (pick 2)
5. Unreserve the internal transfer (pick 3)
6. Go to pick 2, return 2 (pick 4)
   => product is sent back to the supplier
7. Go to pick 4, return 2 (pick 5)
   => product is received from the supplier
8. Go to pick 3, check availability

Only 8 units are reserved instead of 10.

It happens because pick 5 (return of the return) is not linked to the
pick 3 (internal transfer).

We use a similar approach for `move_dest_to_link` than the one used for
`move_orig_to_link`.

Closes #52459

opw-2271838

closes odoo/odoo#53506

X-original-commit: c96339dd94ffe1e9c5103814062455c79d93a273
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-23 12:41:15 +00:00
Nicolas Martinelli 8b49908f8c [FIX] stock: prevent traceback
In case there are several `move_dest_ids`, this piece of code will cause
an error.

X-original-commit: ff17edfd6682ba45397549fb228b37384f634674
2020-06-23 12:41:15 +00:00
Odoo's Mergebot e617aa91c5 [MERGE] tools: better placeholder support for _
Support two new syntaxes with `_()` method:

_("This is so %s") % 2019
_("Text with %s placeholders", 42)
_("Text with %(num)s placeholders %(symbol)s", num=42, symbol="🧀")

The main benefit is to have a fallback on the source string if formating the
translated string fails (e.g. "Foo %s" translated "Foo s%").

This PR converted most (but not all) calls to _ using placeholders to use the
new syntax. Hopefully, the remaining ones will be converted in the future and
avoid technical debt.

Use named placeholders when needed. If more than one placeholder is present in a
string, using named placeholder can be beneficial to reorder the placehodler
position (for languages like Japanese that do not use the same phrase
construction). On some sentences, it also brings clarity on the meaning of the
placeholders.

closes odoo/odoo#52155

Task-id: 1853119
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-18 13:51:48 +02:00
Martin Trigaux ba244cef01 [IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
2020-06-18 13:03:34 +02:00
Tiffany Chang (tic) d970ac0a86 [IMP] stock: make preferred routes always visible in replenish wizard
Previously the option to choose preferred routes in the replenish wizard
was only possible when stock setting: group_stock_adv_location (Multi-Step
Routes) was activated.

Part of specification 4 of overall inventory onboarding improvement task.
Task: 2220129
Related Enterprise PR: odoo/enterprise#10719

closes odoo/odoo#51676

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-18 08:33:34 +00:00
Simon Lejeune 0a768b9c3f [FIX] stock: multi-steps, backorders and return
1. Activate receipt in 3 steps
2. Make a PO of 50
3. Receive 20 (pick 1), backorder
4. Receive 29 (pick 2), backorder
5. Receive 1 (pick 3)
6. Transfer to quality check location 45 (pick 4), backorder (pick 5)
7. Go to pick 5, unreserve the quantity
8. Go to pick 3, return 1 => the quantity suggested by the return wizard is 1

The return is not able to reserve the necessary quantity.

This happens because 45 units are considerd out (from pick 4), but only
1 unit is considered in (pick 3). Therefore, in the following:

https://github.com/odoo/odoo/blob/23511dffb9e3f597a7df9bb834d008f74abb07b8/addons/stock/models/stock_move.py#L1276

we have `quantity = -44.0` and `available_quantity = 5.0`, so we can't
reserve.

We count as `move_orig_ids` all the siblings coming from
`move_dest_ids`.

opw-2261473

closes odoo/odoo#52084

X-original-commit: ba89e26750baab2309cccc4ffd0b3ade804d19ce
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-28 11:53:14 +00:00
Arnold Moyaux 943da6df0f [IMP] stock, purchase_stock, mrp: Replenishment Report
New report to easily order missing products in each warehouse.
Orderpoint have a new type: 'manual'. Manual orderpoint are not
trigger by the scheduler but the user could create replenishment
from the report directly. The report use the forecast report in
order to detect missing quantity for today (it does not search
depending the lead time for each product warehouse due to lake
of performance). It compares missing quantity with incoming RFQ
and other ongoing orderpoint. If it still missing a new entry
for replenihsment is created (it's also automaticaly deleted if
the replenihsment has been done another way).

Task: 2161378
2020-04-22 07:52:45 +00:00
Nicolas Martinelli efbf412083 [FIX] stock: user-default picking return
- Activate Developer mode
- Go to Settings / Technical / Actions / User-defined Defaults
- Create the following:
  Field: To Refund (update SO/PO) (stock.return.picking.line)
  Default Value (JSON format): true
- Create a SO with a product invoiced based on delivered quantity
- Validate the SO, validate the picking
- Return the picking

The field 'To Refund (update SO/PO)' is is not, while it should be.

This is because we don't explicitly call the `default_get`, therefore
only rely on the default value of the field.

opw-2172513

closes odoo/odoo#45235

X-original-commit: 70d6f25b83f962d91243edaa0ff8e9a78b2e18ac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 16:32:12 +00:00
Rémy Voet (ryv)andAnkita Raval 8458cc1867 [IMP] stock, mrp, repair: improve the insufficient quantity wizards
Improve the inherited wizards of 'stock.warn.insufficient.qty' by adding
some piece of information about the quantity involved. Also
change titles to integrated the related product into.

task-2144636

Co-authored-by: Ankita Raval <anr@odoo.com>
2020-01-24 10:47:43 +00:00
Rémy Voet (ryv) 177a479cf6 [REF] stock: clean imports
Clean imports of the main stock module:
- Remove unsued import
- Follow odoo guidelines
- Sort them
2020-01-20 13:58:52 +00:00
Simon Lejeune 6564c36c74 [REF] stock: immediate and backorder wizard multi
followup of rev [0]

If these wizards are called on multiple pickings, display the list of
the pickings that could be impacted and allow to select which one should
be impacted.

We also adapt the sanity checks at the start of `button_validte` in
order to specify the concerned pickings if needed. We do not enable the
multi behavior for batch at the moment, so it's only enabled for the
validate multi in the list view.

[0] 6ab4b0d496

task-2069646

closes odoo/odoo#41497

X-original-commit: ff276c6484b138982f185ec9c832f2dbf25baaef
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-06 14:49:38 +00:00
Victor Feyens 9215e73fa2 [IMP] * : replace with_context(force_company=c) by with_company(c) 2019-11-18 12:25:05 +00:00
Goffin Simon 9713d66a15 [FIX] stock: Returning canceled moves
Steps to reproduce the bug:

- Let's consider two storable products P1 and P2 from the same vendor V
- P1 and P2 have the routes 'Buy' and 'Make to order'
- Create a SO for 1 P1 and 1 P2 and confirm it
- A delivery order DO has been created
- A PO has been created for V, confirm it
- Process the shipment, receive 1 P1 and 0 P2 with no backorder
- Process DO with no backorder
- Return DO by clicking on 'Return' button

Bug:

1 P1 and 1 P2 were suggested to be returned but the movement for P2 had been canceled.

Closes #39547
opw:2116582

closes odoo/odoo#40220

X-original-commit: bb94b6591fb148a4c1b94f9c28d2c10e44e12283
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-11-13 16:05:55 +00:00
David Tran 16f548ed7a [FIX] stock: couldn't select another warehouse on product.replenish form
Wrong key in default_get. It should be `company_id` instead of `company`

closes odoo/odoo#39448

X-original-commit: 0859a5b073aeadf7cfa5e32b7c45cce7a1933f0d
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-28 13:27:16 +00:00
Simon Lejeune 6ab4b0d496 [REF] stock: make picking button_validate multi
So we have to adapt
- the sanity checks
- the immediate/backorder wizards
- split the call to _action_done with and without backorder

This is a preliminary work to remove all the override in
stock_picking_batch and to allow choosing the pickings to immediate or
backorder directly in the wizards.

Before this commit, both wizards were calling _action_done and one
another. We make them go back through `button_validate` so that it is
more sane to handle and allow future extensions to add pre-action done
wizards.

Also the first part of button_validate is some sanity check. We adapt
them to be multi (inside of a loop over self) without any other
changes.

Now the wizard can work on the records (immediate: write the done
quantities) or work with the context (backorder: picking ids to not
backorder in the context).

Also we adapt the stock sms weird wizard (a confirmation wizard but the
feature is auto installed? wth). Now there it isn't manually called in
the middle of button_validate but it uses the pre_action_done_hook.

task-2069646
2019-10-25 08:10:40 +00:00
Arnaud Baes 066e9a0c7d [REM] stock: overprocessed quantity wizard.
related to rev eddc695ac3
the file is not imported but still present

closes odoo/odoo#39246

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-23 11:20:30 +00:00
Arnaud Baes 0c6488a95a [REF] stock: Set action_done on pickings private
`action_done`on pickings should be a private method,
and called only trough the picking validation process.

task-1938108

closes odoo/odoo#39174

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-23 07:43:01 +00:00
Arnaud Baes eddc695ac3 [REM] stock: overprocessed quantity wizard.
As this wizard only shows the first product overprocessed and does nothing else,
we remove it completely for cleaning purposes.

task-1938108

closes odoo/odoo#39161

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-22 09:36:28 +00:00
RomainLibert 9f9c989e60 [FIX] stock: avoid cache miss error in compute
We should check that we have a picking_id before calling a method that
uses `ensure_one`

X-original-commit: e9da11665fe7539bc97c92143525a311af637c3f
2019-10-16 14:17:28 +00:00
svs-odoo 72a0fb6740 [REM] stock: remove stock_picking_responsible.py
As the responsible can be assigned directly in the list view, the assign
responsible wizard is now useless. The Country will not forget what you
did for us wizard, thank you.

closes odoo/odoo#38365

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-10 09:58:22 +00:00
Victor Feyens 0fac83a5da [FIX] stock: product replenishment
The replenish action shouldn't be accessible through the action dropdown
(it makes no sense to replenish consumables or services).
It is already accessible on the product/template form when applicable.

Closes https://github.com/odoo/odoo/issues/38238

closes odoo/odoo#38332

X-original-commit: 52d7008da888f1a84e38c6b110450062ac3bceaa
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-10 06:33:35 +00:00
Victor Feyens 012343ef13 [FIX] stock: do not create products from replenishment wizard.
closes odoo/odoo#38296

X-original-commit: 3b4a0e817b0b6656f0545003f003d4167cd3e2ec
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-09 14:30:55 +00:00
svs-odoo 8c4507e7e3 [REM] stock: remove assign responsible
Removes the action assign responsible on picking since it can be assign
directly on the list view now.
The wizard must be deleted in the next version.

Task #2078163
2019-10-01 13:53:27 +00:00
Arnold Moyaux 186b512023 [FIX] mrp_subcontracting: allow to return to subcontractor 2019-09-18 07:14:53 +00:00
Jairo Llopis eebb8e1484 [FIX] *: remove buggy calls to with_context
When .with_context() is called with a dictionary as 1st positional
argument, it will replace context (and not modify the referenced keys)
It may create bugs when losing the content of the context (e.g. remove
partner's language)

This is a cherry-pick to saas-12.5 of odoo/odoo#36164 of the logistic
part as discussed

closes odoo/odoo#36690

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-11 11:17:50 +00:00
Simon Lejeune b6f053b25e [REF] stock: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

product.template
- make responsible a property field in order to ensure proper next activities when a product
  is used between multiple companies
stock.putaway.rule
- added a company_id field
stock.move.line
- company_id is not related anymore since a move line can exist without a move until its validation
stock.package_level
- added a company_id field
stock.picking.type
- company_id is now required
stock.production.lot
- added a company_id field, adapted the constraint accordingly
stock.quant
- check the consistency only in inventory mode
stock.quant.package
- company_id is now empty if the package is empty
stock.picking
- company_id is now related to the one of its picking type

Added some tests.
Moved stock_traceability in the `report` directory.
Removed useless /tests/tours/route.js.

task-1985992
2019-09-03 15:05:03 +00:00
Arnaud Baes a1759efe69 [ADD] stock: Deep Learning to automatically detect the type of the processed quantities 2019-08-14 12:27:04 +00:00
svs-odoo 1d675780c2 [IMP] stock: adapt assign serial numbers
In detailed operation view, the method to generate and assign multiple
SN numbers will create a move line depending of the SN name the user
defined and the number of SN to generate. These features are only
accessible if picking option "Pre-fill Detailed Operations" is disabled.
Also, hides the quick "Assign Serial Numbers" button in the same case.

Task #2028780
2019-08-13 09:07:48 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
William Henrotin c361c3778e [FIX] stock: unlink scrap on cancel
from f5e99060b6, a scrap order was unlink
when clicking the discard button in the insufficient quantity wizard.
This lead to a access error when the wizard was closed on the scrap order
form view. The form view was reloaded on a deleted record.

This commit adds a context key that prevent the unlink if the scrap order
was validated from the scrap form view

Task : 2043136
2019-08-05 13:10:21 +00:00
Christophe Simonis 886eca0131 [IMP] *: remove usage of oldname attribute
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.

Moreover, this feature was misused. It was:
 - left on fields during multiple versions.
 - used on reports (SQL views). This would be ok if the feature was
   complete, but, as is, it was useless.
 - kept unchanged after a second renaming of the field (which can happen
   versions later the first rename).
 - used, even when the meaning of the field changed. i.e. the field
   `archived` has been renamed to the classic `active`, but the value
   in the database should be switched.
2019-08-05 09:36:41 +00:00
Naglis Jonaitis 7417d8fc13 [IMP] *: fix typos in field definitions
* account, crm, hr, im_livechat, l10n_ch, l10n_it_edi, mail,
mass_mailing, project, stock, base

- `String` -> `string`;
- `defaut` -> `default`;
- `defaults` -> `default`;
- `reandonly` -> `readonly`;
- removed redundant `placeholder` attribute for `Char` field;
- removed redundant `size` attribute for `Float` and `Integer` fields;
- changed to use `Selection` instead of `Char` for a field having a
defined `selection`.

closes odoo/odoo#35356

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-31 17:14:19 +00:00
svs-odoo 02101ace6d [FIX] stock: inventory at date for single product
On stock list view of a single product, when user click on "Inventory at
Date" button, the displayed report shows all products.
This commit makes the report only shows the current product.

Task #2039731
2019-07-26 09:25:25 +00:00
王挺 ac658522df [IMP] Stock: "Manual Replenishment" translatable.
closes odoo/odoo#35200

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-26 00:58:47 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Arnold Moyauxandsvs-odoo ec02ca9176 [IMP] stock, stock_account: inventory at date
Usability improvement because when the user click on inventory
report it's mainly in order to edit/check its current stock since
commit da33eb36b8

This change redirect the user directly on stock.quant tree view
and add an inventory at date button in the control panel. This
button will open the same wizard than previously and ask for a
date. The same principle is used for valuation layer.

Co-authored-by: svs-odoo <svs@odoo.com>

Task: 1880379
2019-07-12 11:37:13 +00:00
Adrian Torres 9e71d57d11 [REM] *: remove calls to api.one and adapt code
Adapt all code that was using `api.one` to recordset-style method and
remove any and all calls to `api.one` in preparation for its removal.
2019-07-05 09:04:45 +00:00