The depreciation was hardcoded as starting the first of January.
If a user changed the configuration to set a different value than 31/12 it had
no impact.
In saas-11.3, this was improved to allow to configure the behaviour at 805f3a610
opw-1878927
Create an asset and confirm it.
Click on Sell or Dispose
The form view of the disposal move opens
With the breadcrums, back to the asset
Click again on sell or dispose
Before this commit, literally nothing happens
This is because there is no more business to do
After this commit, in the case there is no business to do
we fallback onto the smartbutton's action
OPW 1864318
closes#26086
On existing databases, the SQL not null constrain is not removed, making
the creation of new assets impossible. This is because a computed field
is not inserted at creation, but written afterwards.
This reverts commit 0c76bd3c63.
opw-1840661
It was possible to change manually the company of an asset, although its category would be belonging to another company and thus its depreciation lines and journal items also.
To tackle this problem, we set the company_id field of an asset as related to its category
Was PR #23498. Courtesy of Miquel Raïch
- When validating an invoice, the create method of the model account.asset.asset is called.
Accountant have the access rights to create account.asset.asset object, but they do not have the rights to write on them.
The issue here is that the create of the account.asset.asset is done, but right after a right is done in the same object, which trigger an AccessError.
To fix this issue, we make the write using the admin env. This doesn't cause security issues since the user needs the create accesses.
OPW-1832797
- Create an asset, post one line.
- Go back to the asset => the button is green
- Click again on the line => the button is orange
There is no protection to prevent the user to post the same entry
several times (a new account move is created every time it is clicked).
We fix the JS widget, but we add an extra layer of protection at the
Python level.
opw-778756
- Create a vendor bill with a line linked to an asset category
- Validate the bill => an asset is created
- Refund the bill
The refund is also linked to an asset category. Therefore, upon
validation, a negative asset will be created.
The refund should not be linked to the asset category in a first place.
The user should cancel/modify the asset manually.
opw-775933
- Associate a product with a "Deferred Revenue Type"
- Create a customer invoice and add the product => the account of the
deferred revenue is used.
- Create a SO with the same product, and generate the invoice => the
account of the deferred revenue is NOT used.
opw-769254
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.
All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.
Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.
Also removed some dead code or improved the API to remove unnecessary
conversions.
Purpose
=======
Terms are confusing in the deferred revenue app.
Specification
=============
- Rename label "Depreciation" -> "Revenue" in Deferred Revenue Lines wizard
- "Time method" in asset.categories shouldn't show "Number of Depreciation" but "Number of entries" instead
- In Customer Invoice visible field "Deferred Revenue Type" without developer mode
- All the menu related revenue will have same menu name "Deferred Revenues"
- Module name change to => "Deferred Revenues"
- Change module name : "Deferred revenue management for contracts" to "Deferred Revenues Management for Contracts"
- Change the label in time method 'Number of Depreciation' -> 'Number of entries'
- Also change the tooltip on Time Method
before this commit, when a product had its asset_category set, the account attachement to the asset_categ was righfully selected on the invoice line when creating the invoice from scratch
Though, that was not the case when the invoice was created from the po
after this commit the right symmetric behavior is back: the default account that will be selected on invoice line is the asset_category one.
opw 761033
Closes#18687
``import odoo.addons.foo as bar`` doesn't seem to properly trigger the
import hook in Python 3 (it blows up on decimal_precision and
base). Thus convert *all* examples of that pattern to the more
sensible ``from odoo.addons import foo as bar``.
In Python 3:
* various builtins and dict methods were changed to return
view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
removed altogether
This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).
Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.
issue #8530
Before this commit, it was not easily possible to add the seamless closing
workflow while having 2 or more depreciation boards (eg. according to accounting
standard). With this commit, I can construct the move lines independently
inherit properly and pass all created move lines to the window action.
Closes#16073