Commit Graph
95 Commits
Author SHA1 Message Date
Rémy Voet (ryv) 7256e01ad0 [FIX] stock_landed_cost: efficient validate landed cost
Update the standard_price outside the loop to avoid recompute
quantity_svl at each iteration. quantity_svl is not modify in the
process and the standard_price is not read in process.

NewPrice = OldPrice + (cost_to_add_x1) / quantity_svl + (cost_to_add_x2) / quantity_svl
Becomes
NewPrice = OldPrice + (cost_to_add_x1 + cost_to_add_x2) / quantity_svl
which is equals.

opw-2374405
odoo/odoo#64011

closes odoo/odoo#64032

Forward-port-of: odoo/odoo#63742
X-original-commit: b8d7e48f27fc4f0868c538977be8276058944e57
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-05 07:54:32 +00:00
Rémy Voet (ryv) 1f11d968e0 [FIX] stock_landed_cost: improve performance read
Improve performance of SQL in  `_compute_allowed_picking_ids`.
This one can be costly for a simple read of the `allowed_picking_ids`.
Grouping the result to avoid useless big thoughtput and a
add a where clause on company_id to filter out useless row.

opw-2374405
odoo/odoo#64011

Forward-port-of: odoo/odoo#63742
X-original-commit: 209f421b7360a42ab43c09d9aacec6b53ad24917
2021-01-05 07:54:32 +00:00
Nicolas Martinelli 36da97a0db [FIX] stock_landed_costs: fix account for non-anglosaxon accounting companies
This reverts commit c382e8c81f7c3739bf5875d621623f971aa9ccab.

closes odoo/odoo#60431

X-original-commit: 84ec7277193958d914d0c976d85a00d2270a0563
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-21 10:46:33 +00:00
Andrea Grazioso (agr-odoo) b439ee1022 [FIX] stock_landed_costs: fix account for non-anglosaxon accounting companies
Steps to reproduce:
1. Activate landed costs
2. Create a product that in the purchase tab has active 'Is a landed
cost'
3. Add this product to a purchase order
4. Confirm the PO, create the bill and create landed costs entry

Since they don't use anglosaxon accounting they expect the
invoice line account to be used for the landed cost. It will come in
empty as it is looking at the stock input account.

opw-2332763

closes odoo/odoo#59626

X-original-commit: f500bec7c1a2de799c0d4deb9b7ee43a69b3b46a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-09 11:56:03 +00:00
Andrea Grazioso (agr-odoo) 1126e6614b [FIX] stock_landed_costs: propagate landed costs line from po to bill
Steps to reproduce:
1. Activate landed costs
2. Create a product that in the purchase tab has active 'Is a landed
cost'
3. Add this product to a purchase order
4. Confirm the PO and create the bill

is Landed costs checkbox is not enabled when this product is
being invoiced. Any time you add this product to an invoice manually it
will have it on. They want that same behavior when the invoice line
comes from Purchase Order

opw-2332763

X-original-commit: d8f5ed417deb82151abf7a25ad16ce0720e90780
2020-10-09 11:56: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
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
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
Martin Trigaux 6db2a81ea2 [IMP] *: use specific ir.property methods
Do not make direct CRUD to ir.property records, use appropriate
methods for that
2020-05-26 15:50:11 +02:00
Raphael Collet ea3e39506a [IMP] models: use slots for BaseModel
This restricts the attributes of a BaseModel instance to `env`, `_ids`
and `_prefetch_ids`.  This way, one can only assign fields on a record;
other assignments are programming errors.

This also reduces the memory footprint of records from 168 to 64 bytes
(-62%), and makes their instanciation faster.

closes odoo/odoo#51075

Related: odoo/enterprise#10529
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-18 09:51:43 +00:00
Xavier Morel 9b2e59d947 [REM] stock_landed_costs: digits on monetary field 2020-04-07 09:25:08 +00:00
Rémy Voet (ryv) c6e52e9037 [IMP] stock_landed_costs(_mrp): allow to choose mrp production in landed costs
When we create a landed cost, we can now apply it on a
manufacturing order instead of a picking. Also, change
some Float fields in Monetary ones and add the currency_id
field in views.

task-2123752

closes odoo/odoo#44109

Related: odoo/upgrade#822
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-04 16:07:47 +00:00
Rémy Voet (ryv) 5e115743d2 [IMP] stock_landed_costs: add split method on product
On the product form, when "Is a Landed Cost" is checked,
show a "Split Method" selection field. When creating a
Landed cost with this product, automatically
set the right split method on the line.

This behavior was removed by 24bca8fd4a

task-2123752
2020-03-04 16:07:47 +00:00
Victor Feyens 2556d5a024 [FIX] stock(_*): ensure properties are read with the correct company. 2020-02-27 12:19:24 +00:00
Nicolas Martinelli bef4a3bad6 [FIX] stock_landed_costs: multi-currency
- Activate 2 currencies
- Create a landed cost product
- Create a Vendor Bill in a currency different from the company currency
- Add the landed cost product
- Click on 'Create Landed Costs'

The landed cost is created in the company currency, but with the amounts
in the vendor bill currency.

This happens because the currency conversion is missing.

opw-2200500

closes odoo/odoo#45861

X-original-commit: 41f52aef54ddf9ab4cd0f23c1224c2d7581a1ede
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 16:57:31 +00:00
Ankita Raval d675dbaa4c [IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
2020-02-19 09:09:20 +00:00
Rémy Voet (ryv) 5e01d97b1d [FIX] stock_landed_costs: fix links account move<->valuation
When we valide a stock landed costs with a stock picking
with multiple products, when two stock valuation layers is created,
only one was link to the journal account move.

task-2123752

closes odoo/odoo#45178

X-original-commit: d141c5fdb5cf9b7d2b365dadcfa6ccd9c4d38d4c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-12 11:15:07 +00:00
Simon Lejeune 93b2377656 [FIX] stock_landed_costs: reconciliation with vendor bill
in anglo saxon accounting
- receipt products through an rfq
- when creating the vendor bill of the rfq, directly add a landed costs
  product
- post the vendor bill then create the landed cost, validate the landed
  cost
- the aml of the LC is not reconciled with the aml of the vendor bill
  for the lc product because the "You are trying to reconcile some
  entries that are already reconciled." error.

We fix this by filtering out the already reconciled aml.
Not that the flow is behaving as expected if the landed cost is created
in another vendor bill, such as the tests were doing. We thus add
another test.

opw-2184988

X-original-commit: 1e78527ac5295563e9610ad9ddd98834998285f3
2020-02-06 20:50:57 +00:00
Nicolas Martinelli 749d4730a2 [FIX] delivery, product, stock: use 'Volume' decimal precision
Use the 'Volume' decimal precision on all `volume` fields.

Complement of commit c1a5221ba2

opw-2185374

closes odoo/odoo#44473

X-original-commit: dc0111d6cdf4032fa840f9ff95f4fa687d33f77c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-03 11:10:24 +00:00
Nicolas Martinelli f06397b2e6 [FIX] stock_landed_costs: skip cancel move
- Create a product A, FIFO and Automated
- Create a PO for 50 units
- Receive 45 units, no backorder
- Create a landed cost for the picking

The landed cost is split between the two move lines (45 units and 5
units).

This occurs since in v13, there is no canceled picking created for the
backorder, but a canceled stock move.

We filter out canceled moves.

opw-2179145

closes odoo/odoo#44095

X-original-commit: 120a2d116e4820fa9a4529e8ef01569823d02d13
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-28 12:15:02 +00:00
Simon Lejeune 50cbaef2dd [REF] stock_landed_costs: domain on transfers
The previous domain was too naive: a receipt is not always valued
(inter-warehouse transfer) and even a receipt that should be valued
isn't always (receive goods you do not own, change your config from
manual to automated and then apply the lc on an old receipt, etc.)

Enforce a domain making sure the transfer is valued.

related opw-2165697
task-2169844

closes odoo/odoo#43410

X-original-commit: c6aa61b22a18c3f110baa7ed3c97e275b21e5329
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-16 12:07:42 +00:00
Nicolas Martinelli 1227e40776 [FIX] stock_landed_costs: prevent crash
Prevent crash if `stock_valuation_layer_ids` is an empty recordset. Note
that the original issue is solved with #43017, but requires an upgrade
of the module.

opw-2172049

closes odoo/odoo#43289

X-original-commit: 8a1ce12aee326b59f33f48804a4cfca61dab7506
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-14 14:41:57 +00:00
Simon Lejeune 387f199ee7 [FIX] stock_landed_costs: remaining_value and multiple lc
Steps to reproduce:
Create one product with FIFO and automatic inventory valuation.
Purchase product with 10 quantity and cost price 100 and mark shipment as done.
Add landed cost for done incoming shipment with 2 cost lines
E.g. 1. Freight Charges - 100
2. Duty and Charges - 50
So ideally after first outgoing shipment total cost should get updated in product is
(1000 + 100 + 50) / 10 which is 115

The issue is that we increment `remaining_value` on the wrong layer.

Fixes #41923

task-2167659

closes odoo/odoo#42871

X-original-commit: 8b89a5e4a85071055bc152b11cf150e62a5c5211
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-07 14:47:06 +00:00
Goffin Simon 1a315ffa67 [FIX] stock_landed_costs: How change split method default value
Steps to reproduce:

- Create a default value = 'by_volume' for the field Split method on model stock.landed.cost.lines
- Create a landed cost and add a line

Bug:

The default value was always 'equal'.

opw:2161334

closes odoo/odoo#42460

X-original-commit: 34d93802f33dd845c5fce8a3838c98db18bd7484
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-12-30 09:41:36 +00:00
Debauche Stéphane 42d3a82a80 [IMP] stock_account: remove the wizard which change the `standard_price`
Overwrite the method ``write`` of the model ``product.product``.

When we write on ``standard_price``, if
- the context key ``disable_auto_svl`` is not set
- the ``cost_method`` is not "fifo"
We automatically compute ``stock.valuation.layer``

(before we needed to manually call ``_change_standard_price``)

Task #2031422

closes odoo/odoo#41265

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-06 10:58:03 +00:00
Victor Feyens 9215e73fa2 [IMP] * : replace with_context(force_company=c) by with_company(c) 2019-11-18 12:25:05 +00:00
Christophe Simonis 5a273e74f0 [MERGE] forward port branch saas-12.4 up to fe59754c52
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-13 13:32:51 +00:00
Christophe Simonis 51354fadb0 [MERGE] forward port branch saas-12.3 up to 50e571acf7
closes odoo/odoo#36491

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11 09:39:33 +00:00
Christophe Simonis 9bf0b04adb [MERGE] forward port branch 12.0 up to 82a8cdd6f2 2019-09-06 17:52:48 +02:00
Nans Lefebvre 19b17365d7 [FIX] stock_landed_costs: do not (incorrectly) use float_compare to mean float_is_zero
Take a landed cost with an amount_total of 2464788.5
in a currency with no decimals, so precision_digits is 0.
Now let the sum of the lines 2464788.499999999.
Additionally, we have that 2464788.5 is rounded up to
2464789 and 2464788.499999999 is rounded down to 2464788.
So float_compare returns a nonzero value.
However, it turns out that the docstring of float_compare contains:

Warning: ``float_is_zero(value1-value2)`` is not equivalent to
``float_compare(value1,value2) == 0``

So the intended use was to use float_is_zero.

opw-2048388

closes odoo/odoo#36208

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-04 06:46:12 +00:00
Simon Lejeune b43b61e13d [REF] stock_landed_costs: multi company
Display company_id on the form.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune 15245a4f1f [REF] stock_account: fifo rounding
Reintroduce remaining_value on the valuation layer. We thought we could
get rid of it and only use unit_cost but with tricky receipt value such
as 10 for three units it works indeed better.

Increment remaining_value when applying a landed cost, don't use this
field anywhere else than _run_fifo. It's a shame we have to edit in
place the value of a layer while we were able to keep them as they were
everywhere else...

There still an imprecision sometimes due to the representation of float
and their way through currency.round (see test_rounding_2) so we also
call currency.round on the computed field value_svl to get a real 0
value.

task-2057877

closes odoo/odoo#36013

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-08-23 09:20:40 +00:00
Simon Lejeune 90c055cd35 [REF] stock_landed_costs: create from vendor bill
Add a many2one on the landed cost to the vendor bill. Allow to create a
landed cost from a vendor bill if the product is a service. It will use
the price_subtotal of the account move line. Add a is_landed_costs_line
to separate products of landed costs on the account move line. It's a
checkbox. Ticking the checkbox will change the account of the account
move if the company is in anglo saxon accounting.

Tweak the accounts used by the landed costs so that everything is well
balanced (see the added tests). Auto reconcile AML when possible.

task-59011
2019-08-07 14:11:21 +00:00
Simon Lejeune 24bca8fd4a [REF] stock_landed_costs: landed cost special product
We remove the special views/actions/menuitems for the "landed cost type"
product. The user should now chose the split method on the landed costs
directly. We still keep the landed_cost_ok field that will be used in
the next commit integrating the landed costs with the vendor bill.

task-59011
2019-08-07 14:11:21 +00:00
Simon Lejeune 98f974cae3 [REF] stock_landed_costs: default journal id
Set a default journal on the company, use it on the landed costs form.
I was not able to directly set the value on the filed with a post init
hook because the stock journal is generated a while after the landed
costs installation in the l10n_generic_coa module.

task-59011
2019-08-07 14:11:21 +00:00
Simon Lejeune bc628b320d [REF] stock_landed_costs: usability changes
- update label for account_journal_id
- remove cost lines explanation
- label of the LC name
- remove former cost per unit
- auto compute cost line when validating
- rename former cost into original value
- remove additional landed cost form the tree view
- stock_landed_costs: rename cost line into additional costs
- add a final value field (Lucky day: the field I had to add was already
  defined but not used.)
- use monetary field
- make weight and volume optional
- journal entry visible only if posted
- landed costs wording in settings
- raise of no transfers are defined before validating

task-59011
2019-08-07 14:11:21 +00:00
Simon Lejeune 68d8e49f2f [REF] stock_landed_costs: adapt to valuation layers
We need to increment the value of another layer. We don't  want to write
on this layer in place as we used to do for multiple reasons:
- valuation at date: before the application of an lc, the value should
  not change
- if the layer was consumed, we would need to adapt the consumers and
  if one day we would have needed to understand what happened in the
  fifo stack it would be hell

So we allow to create a valuation layer linked to another valuation
layer through a simple M2O O2M. At the time it is only used on the
landed costs to add value and no quantity so the code expects it would
be the case and it is not enforced. We adapt `_run_fifo` to use the full
value.

We also add a stat button on the landed cost to access the valuation
layers, like what is done for the picking and manufacturing orders.

task-1875873
2019-06-10 20:43:00 +00:00
Yannick Tivisse f5dfe4727c [IMP] api.py: Rename company_id/company_ids into company/companies
The goal is to be coherent with the user property.

Actually, company_id and company_ids on the environment are no fields.

Calling env.company_id returns a browse record, not an id.
2019-05-29 08:09:15 +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
Simon Lejeune ee50b4a20c [REF] stock_landed_costs: enabled for AVCO
mostly thanks to rev 168f4d75ef

task-1985422

closes odoo/odoo#34795

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-16 14:19:41 +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
Mitali Patel 9d710df076 [REF] *: use the new decimal precision syntax
Since previous commit moved decimal_precision module's feature into base,
use the new syntax for fields declaration
Remove the imports to the removed module
Remove the module from dependency in manifest

sed -i "s|digits=dp.get_precision('\([A-Z a-z]*\)')|digits='\1'|" **.py
sed -i "/from odoo.tools import decimal_precision as dp/d" **py
2019-07-03 11:16:24 +00:00
Yannick Tivisse a5b6f31cf2 [IMP] base: Contextualize the multi company
Purpose
=======

Allow the user to select the allowed companies for which he wants to see records
on top of selecting his current company.

It is confusing for users to see the records from the company he is connected to
and the records of the children companies.

Instead of using the hierarchy of companies to access records across companies,
the user can now select (from his set of allowed companies) the companies for
which he wants to access records.

/!\ This means that the user will interact with records from company A when in
company B.
Example: a SO has been created and confirmed in A. When in B, I create the
invoice from it.

Specifications
==============

1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
kept on the res.company model to ensure the retro-compatibility, but won't be used
accross the standard code anymore. The only functional usage for this mechanism
was to allow to see records from several companies by creating a virtual parent
company, which will be possible with the new mechanism.

2/ By default, a user will only see the records of the company he is connected
to (or records without a company). (It is still editable by the user if needed).
For that, put this information in the user context, to allow having different
configurations on different browser tabs. Instead of having domains like
['|',
('company_id', '=', False),
('company_id', 'child_of', user.company_id.id)]
you'll have something like
['|',
('company_id', '=', False),
('company_id', 'in', company_ids)]
Note that the 'company_ids' is a value that is passed in the evaluation
context on the record rule, as we already have user, or time.
company_ids is a list of the ids of all the enabled companies in the
user's context.

3/ Out of the generic improvements brought by this task, this will illustrate
issues that could exist since several versions. For example, it should not be
possible to create a scrap order for the company A with a package of the company
B, or it should not be possible to create an invoice on the company A with
payment terms from the company B. Before the version 12.0, it was easy to
encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
effect of the fact that the SUPERUSER_ID has become an inactive user was to
make it more difficult to introduce mismatch on the records, but haven't solved
the issue, as it was still possible to do it with parent companies
configuration. Some of these issues have been fixed in this commit, but all the
business flows should be re-tested to check if an ir.rule should be introduced
(eg: a multi company rule for stock.quand.package), if the company of a record
is correctly transfered to another record created from the first record (eg:
From a SO, create an invoice and a payment, the company of the sales order
should be transfered on the invoice and the payment, even if the company of the
sales order is A and I'm logged into the company B with the company A enabled.

4/ Currently, if I click on a button on a notification email (example 'View
Task'), I face a traceback if I'm not logged into the company of the record.
Now, if you click on a button and if you have access to the record, the correct
company will be automatically set.

5/ If I display a kanban view with several records from several companies (and
an image), all the images should be displayed.

6/ Currently if you copy paste an url, this will crash if you're not in the
correct company. This won't be fixed because it's quite impossible to do it in
a clean way. This task brings a workaround. Copy/Paste -> Traceback -> Log into
the correct company, re-copy/paste -> Ok.

7/ 2 property methods have been added on the environment to retrieve the company
on which the user is logged in and the companies the user enabled, on a specific
tab.
That way, when creating a record, instead of doing
default=lambda self: self.env.user.company_id
do
default=lambda self: self.env.company_id
On the other hand, to retrieve the enabled companies, do
companies = self.env.company_ids

8/ Modify the Company Switcher widget to allow to log into another company
WITHOUT writing on the res.users (and thus bringing cache invalidation issues
and so on). Also allow to enable several companies and see records from several
companies, and independantly of the other browser's tabs.

9/ When focusing on a tab, save the current company configuration on the local
storage. That way, when doing 'CTRL+T' or a middle click, the context is
propagated to the new tab.

10/ Improve the error message in case of multi company access errors. Now, when
the user is in debug mode, display the related names of the records and the name
of the user who brings the issue.

11/ Remove the context erasing when writing on a res.users
This is probably coming from the migration to new API of the base module.
The context was not propagated at this moment, which was a common mistake at
that time. When migrating the module, probably by using the 'black box' method,
as the context was not propagated, it was erased on the new version. This is
now an issue because the context (i.e. the enabled companies) was erased when
writing on a res.users, leading to tracebacks.
See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624

12/ Fix the crash manager on redirect warnings. The issue is the following
- Create an invoice on a company without a configured CoA.
- Set a partner
- On the onchange_partner_id, a redirect warning is raised to propose you
to configure a CoA
- Click on 'Go to the configuration panel'
- A generic warning says something like 'Do you want to discard your changes?'
- Click on yes, the page refreshes, but not on the redirect action.
Now, set correctly the action on the hash, and reload instead. The breadcrumb is
lost for example, but you reach the correct action at least.

13/ Introduce a res.group to enable/disable the multi company per tab
feature.

14/ To help the users to know which tab is in which company, add the
possibility to have a favicon per company. When creating a company,
the classical 'O' icon is colored by default in a random color.

15/ Remove the company switcher on the frontend. This was mainly there
to allow a user to swicth to the company linked to the website.
This behavior is now transparent to the user. If the website A is
activated, then the company set on the context is the company of the
website.

16/ Deprecated the _company_default_get method on the res.company
model. Remove the method _get_company on the res.users model.

17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
context. You can now use those variables on domains in the views to
access directly to the activated company.ies on the current tab.

TaskID: 1960971

closes odoo/odoo#32341

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-13 08:57:49 +00:00
Christophe Simonis 4400cce820 [MERGE] forward port branch saas-12.1 up to 4524ad06a8 2019-02-04 13:27:22 +01:00
Christophe Simonis f927c68ddb [MERGE] forward port branch 12.0 up to cb8fefa899 2019-01-31 16:59:58 +01:00
Christophe Simonis c8ace043e5 [MERGE] forward port branch saas-11.3 up to 387d5cff90
closes odoo/odoo#30566
2019-01-25 17:29:34 +00:00
Christophe Simonis fab415acab [MERGE] forward port branch 11.0 up to 984a99611e 2019-01-23 18:15:18 +01:00
ougc27 8cba55ce31 [FIX] stock_landed_costs: cost account when dropship
- Set FIFO as costing method in product category
- Create a stockable product with the category configured previously
- Create a SO with the stockable product for 1 unit with dropship route
  and confirm the SO
- Confirm the PO created from the Sale Order to generate the delivery
- Process the stock picking
- Create a new Landed Cost with the stock picking delivered with a cost
  line with split method "Equal".
- Generate the valuation adjustments and confirm the landed cost to
  generate the journal entry

The debit account is wrong because the system takes the inventory
valuation account instead the expense account.

Odoo must take the expense account because the product never enter to
the company inventory, so is a cost of sale.

opw-1922633

closes odoo/odoo#29947
2019-01-23 10:59:11 +00:00
Nimesh Jethva b0a6f3398d [IMP] *: add next activities on all modules
*: account, event, mrp, purchase_requisition, stock_landed_cost, stock_picking_batch

Add activity on below models:
account.payment
event.event
event.registration
mrp.workorder
purchase.requisition
stock.landed.cost
stock.picking.batch

Related Task ID : 1867620

closes odoo/odoo#26092
2018-11-26 12:28:19 +00:00
Thibault Delavallée b8197ff178 [REF] various: update tracking parameters
Purpose is to clean the use of tracking parameters on fields. Parameters are
merged and is now tracking=<int> or tracking=True.

This commit is linked to task ID 1903814 and PR #28430.
2019-01-04 11:46:14 +00:00