-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][MIG] stock_request_analytic: Migration to 16.0 #16
Conversation
* clean views. * allow to create a stock.request with no analytic account. * remove copy attribute in non-stored field. * remove non-existing field from compute method.
Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (8 of 8 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_request_analytic Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_analytic/zh_CN/
Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (8 of 8 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_request_analytic Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_analytic/pt_BR/
Co-authored-by: Pimolnat Suntian <pimolnats@ecosoft.co.th> TT28896 [UPD] Update stock_request_analytic.pot [UPD] README.rst
…nt values If procurement will trigger a purchase and not a move, there is no mean to transmit it (e.g.: to purchase). [UPD] Update stock_request_analytic.pot [UPD] README.rst stock_request_analytic 14.0.1.0.1
stock_request_analytic 14.0.1.0.2
Currently translated at 100.0% (9 of 9 strings) Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_request_analytic Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_request_analytic/pt_BR/
[UPD] README.rst stock_request_analytic 14.0.1.0.3
[UPD] Update stock_request_analytic.pot [UPD] README.rst stock_request_analytic 15.0.1.0.1 Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-15.0/stock-logistics-warehouse-15.0-stock_request_analytic Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_request_analytic/
Translated using Weblate (Spanish) Currently translated at 41.6% (5 of 12 strings) Translation: stock-logistics-warehouse-15.0/stock-logistics-warehouse-15.0-stock_request_analytic Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_request_analytic/es/ Translated using Weblate (Spanish) Currently translated at 100.0% (12 of 12 strings) Translation: stock-logistics-warehouse-15.0/stock-logistics-warehouse-15.0-stock_request_analytic Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_request_analytic/es/ [UPD] README.rst
…to avoid permissions errors [BOT] post-merge updates
Translated using Weblate (Italian) Currently translated at 100.0% (12 of 12 strings) Translation: stock-logistics-warehouse-15.0/stock-logistics-warehouse-15.0-stock_request_analytic Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_request_analytic/it/
Changes done: - Analytic_account_id field is removed from stock.request (and all related). - Added analytic_distribution field to stock.request. TT47865 Co-authored-by: Urvisha-OSI
6367597
to
a877399
Compare
/ocabot migration stock_request_analytic |
There's no issue in this repo with the title 'Migration to version 16.0' and the milestone 16.0, so not possible to add the comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migration scripts are missing. Check https://github.com/OCA/openupgradelib/blob/master/openupgradelib/openupgrade_160.py#L418
class AccountAnalyticAccount(models.Model): | ||
_inherit = "account.analytic.account" | ||
|
||
stock_request_ids = fields.One2many( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing this? I think it's still useful, but it should be computed and extracted from the analytic distributions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The analytical distribution is done at each record (in each stock.request
), not at the analytical account level, so I can't extract it from there directly. Although what you mention could be done, I don't know if it is worthwhile and/or useful because I think this is not done in any other module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should know if the smart-button was used or not, but I would bet it was...
class StockRequestOrder(models.Model): | ||
_inherit = "stock.request.order" | ||
|
||
analytic_count = fields.Integer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same
readonly=True, | ||
compute_sudo=True, | ||
) | ||
default_analytic_account_id = fields.Many2one( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A similar feature should be added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What functionality exactly? The analytical accounts are no longer "useful", analytical distribution (from stock.request) is now what matters. Do you want to add a default analytical distribution at stock.request.order level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That the analytic distribution is filled with this default analytic account. Anyway, the same, check if it's used or not in our customers.
Finally I will not continue with this migration because I do not need this module, although anyone can continue with the work already done. Some comments that I think may be useful:
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Superseed #3
Migration to 16.0
Changes done:
Analytic_account_id
field is removed fromstock.request
(and all related).analytic_distribution
field to stock.request.Please @chienandalu and @pedrobaeza can you review it?
@Tecnativa TT47865