Skip to content

Commit

Permalink
[MIG] account_cutoff_accrual_picking: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dzungtran89 committed Jan 5, 2023
1 parent 4a265fa commit 8f61db4
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 20 deletions.
21 changes: 14 additions & 7 deletions account_cutoff_accrual_picking/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Account Cut-off Accrual Picking
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--closing-lightgray.png?logo=github
:target: https://github.com/OCA/account-closing/tree/15.0/account_cutoff_accrual_picking
:target: https://github.com/OCA/account-closing/tree/16.0/account_cutoff_accrual_picking
:alt: OCA/account-closing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-closing-15-0/account-closing-15-0-account_cutoff_accrual_picking
:target: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_cutoff_accrual_picking
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/89/15.0
:alt: Try me on Runbot
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/account-closing&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Expand Down Expand Up @@ -57,7 +57,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-closing/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-closing/issues/new?body=module:%20account_cutoff_accrual_picking%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-closing/issues/new?body=module:%20account_cutoff_accrual_picking%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -73,6 +73,13 @@ Contributors
~~~~~~~~~~~~

* Alexis de Lattre <[email protected]>
* `Trobz <https://trobz.com>`_:
* Dzung Tran <[email protected]>

Other credits
~~~~~~~~~~~~~

The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp

Maintainers
~~~~~~~~~~~
Expand All @@ -95,6 +102,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/account-closing <https://github.com/OCA/account-closing/tree/15.0/account_cutoff_accrual_picking>`_ project on GitHub.
This module is part of the `OCA/account-closing <https://github.com/OCA/account-closing/tree/16.0/account_cutoff_accrual_picking>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion account_cutoff_accrual_picking/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Account Cut-off Accrual Picking",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Accrued expense & accrued revenue from pickings",
Expand Down
12 changes: 6 additions & 6 deletions account_cutoff_accrual_picking/models/account_cutoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def picking_prepare_cutoff_line(self, vdict, account_mapping):
"name": vdict["name"],
"account_id": account_id,
"cutoff_account_id": accrual_account_id,
"analytic_account_id": vdict["analytic_account_id"],
"analytic_distribution": vdict["analytic_distribution"],
"currency_id": vdict["currency"].id,
"quantity": qty,
"price_unit": vdict["price_unit"],
Expand Down Expand Up @@ -139,7 +139,7 @@ def order_line_update_oline_dict(self, order_line, order_type, oline_dict):
price_origin = invoice.name
currency = invoice.currency_id
account_id = iline.account_id.id
analytic_account_id = iline.analytic_account_id.id
analytic_distribution = iline.analytic_distribution
taxes = iline.tax_ids
if not price_origin:
if order_type == "purchase":
Expand All @@ -149,7 +149,7 @@ def order_line_update_oline_dict(self, order_line, order_type, oline_dict):
price_unit = order_line.price_subtotal / oline_qty_puom
price_origin = order.name
currency = order.currency_id
analytic_account_id = order_line.account_analytic_id.id
analytic_distribution = order_line.analytic_distribution
taxes = order_line.taxes_id
account = product._get_product_accounts()["expense"]
if not account:
Expand All @@ -170,7 +170,7 @@ def order_line_update_oline_dict(self, order_line, order_type, oline_dict):
price_unit = order_line.price_subtotal / oline_qty_puom
price_origin = order.name
currency = order.currency_id
analytic_account_id = order.analytic_account_id.id
analytic_distribution = order_line.analytic_distribution
taxes = order_line.tax_id
account = product._get_product_accounts()["income"]
if not account:
Expand All @@ -190,7 +190,7 @@ def order_line_update_oline_dict(self, order_line, order_type, oline_dict):
"price_unit": price_unit,
"price_origin": price_origin,
"currency": currency,
"analytic_account_id": analytic_account_id,
"analytic_distribution": analytic_distribution,
"account_id": account_id,
"taxes": taxes,
}
Expand Down Expand Up @@ -261,7 +261,7 @@ def get_lines(self):
# }
# -> we use precut_delivered_qty - precut_invoiced_qty
for p in pickings:
for move in p.move_lines.filtered(lambda m: m.state == "done"):
for move in p.move_ids.filtered(lambda m: m.state == "done"):
self.stock_move_update_oline_dict(move, oline_dict)

# from pprint import pprint
Expand Down
2 changes: 2 additions & 0 deletions account_cutoff_accrual_picking/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* Alexis de Lattre <[email protected]>
* `Trobz <https://trobz.com>`_:
* Dzung Tran <[email protected]>
1 change: 1 addition & 0 deletions account_cutoff_accrual_picking/readme/CREDITS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp
25 changes: 19 additions & 6 deletions account_cutoff_accrual_picking/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Account Cut-off Accrual Picking</title>
<style type="text/css">

Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Account Cut-off Accrual Picking</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-closing/tree/15.0/account_cutoff_accrual_picking"><img alt="OCA/account-closing" src="https://img.shields.io/badge/github-OCA%2Faccount--closing-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-closing-15-0/account-closing-15-0-account_cutoff_accrual_picking"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/89/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-closing/tree/16.0/account_cutoff_accrual_picking"><img alt="OCA/account-closing" src="https://img.shields.io/badge/github-OCA%2Faccount--closing-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_cutoff_accrual_picking"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?repo=OCA/account-closing&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module generates expense and revenue accruals based on the status of
orders, pickings and invoices.</p>
<p>To understand the behavior of this module, let’s take the example of an expense accrual. When you click on the button <em>Re-Generate Lines</em> of an <em>Expense Accrual</em>:</p>
Expand All @@ -390,7 +390,8 @@ <h1 class="title">Account Cut-off Accrual Picking</h1>
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
<li><a class="reference internal" href="#other-credits" id="id6">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
</ul>
</li>
</ul>
Expand All @@ -404,7 +405,7 @@ <h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-closing/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-closing/issues/new?body=module:%20account_cutoff_accrual_picking%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-closing/issues/new?body=module:%20account_cutoff_accrual_picking%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -419,18 +420,30 @@ <h2><a class="toc-backref" href="#id4">Authors</a></h2>
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://trobz.com">Trobz</a>:</dt>
<dd><ul class="first last">
<li>Dzung Tran &lt;<a class="reference external" href="mailto:dungtd&#64;trobz.com">dungtd&#64;trobz.com</a>&gt;</li>
</ul>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id6">Other credits</a></h2>
<p>The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp</p>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-closing/tree/15.0/account_cutoff_accrual_picking">OCA/account-closing</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-closing/tree/16.0/account_cutoff_accrual_picking">OCA/account-closing</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down

0 comments on commit 8f61db4

Please sign in to comment.