[MIG] account_purchase_stock_report_non_billed: Migration to 16.0

pull/1184/head
Christopher Ormaza 2024-05-31 10:27:49 -05:00 committed by Pedro M. Baeza
parent 80e72341fd
commit 211c63b61b
4 changed files with 45 additions and 46 deletions

View File

@ -17,13 +17,13 @@ Account Purchase Stock Report Non Billed
: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--financial--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/account-financial-reporting/tree/15.0/account_purchase_stock_report_non_billed
:target: https://github.com/OCA/account-financial-reporting/tree/16.0/account_purchase_stock_report_non_billed
:alt: OCA/account-financial-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-reporting-15-0/account-financial-reporting-15-0-account_purchase_stock_report_non_billed
:target: https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-account_purchase_stock_report_non_billed
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@ -52,7 +52,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-reporting/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_purchase_stock_report_non_billed%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_purchase_stock_report_non_billed%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.
@ -94,6 +94,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-CarlosRoca13|
This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/15.0/account_purchase_stock_report_non_billed>`_ project on GitHub.
This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/16.0/account_purchase_stock_report_non_billed>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Purchase Stock Report Non Billed",
"version": "15.0.1.1.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-reporting",

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@ -369,7 +368,7 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:cd13cc9df796bb24fe02e2cdcd3ead8c81de004968ccdbec83bc73a9d316691b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/account-financial-reporting/tree/15.0/account_purchase_stock_report_non_billed"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-15-0/account-financial-reporting-15-0-account_purchase_stock_report_non_billed"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/account-financial-reporting/tree/16.0/account_purchase_stock_report_non_billed"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-account_purchase_stock_report_non_billed"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&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>Module that extends account_sale_stock_report_non_billed to add the non billed stock
moves comming from purchase orders.</p>
<p><strong>Table of contents</strong></p>
@ -400,7 +399,7 @@ showed at the tree view.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/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 to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_purchase_stock_report_non_billed%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-financial-reporting/issues/new?body=module:%20account_purchase_stock_report_non_billed%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">
@ -431,7 +430,7 @@ 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 image-reference" href="https://github.com/CarlosRoca13"><img alt="CarlosRoca13" src="https://github.com/CarlosRoca13.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/15.0/account_purchase_stock_report_non_billed">OCA/account-financial-reporting</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/16.0/account_purchase_stock_report_non_billed">OCA/account-financial-reporting</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>

View File

@ -24,7 +24,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
self.po.button_confirm()
picking = self.po.picking_ids[0]
picking.action_confirm()
picking.move_lines.quantity_done = 1.0
picking.move_ids.quantity_done = 1.0
picking.button_validate()
return picking
@ -35,7 +35,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertIn(move.id, domain_ids)
self.assertEqual(move.currency_id, move.purchase_line_id.currency_id)
@ -50,7 +50,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertNotIn(move.id, domain_ids)
def test_03_report_move_partially_invoiced(self):
@ -58,7 +58,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
self.po.button_confirm()
picking = self.po.picking_ids[0]
picking.action_confirm()
move_done = picking.move_lines[0]
move_done = picking.move_ids[0]
move_done.quantity_done = 1.0
picking.button_validate()
inv_action = self.po.action_create_invoice()
@ -68,9 +68,9 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
# Done other moves to appear at report
picking_ret = self.po.picking_ids.filtered(lambda p: p.state == "assigned")
picking_ret.action_confirm()
picking_ret.move_lines.quantity_done = 1.0
picking_ret.move_ids.quantity_done = 1.0
picking_ret.button_validate()
moves_not_done = picking_ret.move_lines
moves_not_done = picking_ret.move_ids
wiz = self.env["account.sale.stock.report.non.billed.wiz"].create(
{"date_check": fields.Date.today()}
)
@ -86,7 +86,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
picking = self.po.picking_ids[0]
# Process pickings
picking.action_confirm()
picking.move_lines.quantity_done = 1.0
picking.move_ids.quantity_done = 1.0
picking.button_validate()
# Create invoice
inv_action = self.po.action_create_invoice()
@ -98,7 +98,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertNotIn(move.id, domain_ids)
# Refund invoice
wiz_invoice_refund = (
@ -115,7 +115,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
wiz_invoice_refund.reverse_moves()
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertIn(move.id, domain_ids)
# Create invoice again
inv_action = self.po.action_create_invoice()
@ -124,7 +124,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
new_invoice.action_post()
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertNotIn(move.id, domain_ids)
def test_05_report_move_partial_pickings_full_invoice(self):
@ -132,17 +132,17 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
self.po.button_confirm()
picking = self.po.picking_ids[0]
picking.action_confirm()
picking.move_lines.quantity_done = 3.0
picking.move_ids.quantity_done = 3.0
res_dict = picking.button_validate()
move_lines = picking.move_lines
move_lines = picking.move_ids
self.env["stock.backorder.confirmation"].with_context(
**res_dict["context"]
).process()
picking = self.po.picking_ids.filtered(lambda p: p.state != "done")
picking.action_confirm()
picking.move_lines.quantity_done = 2.0
picking.move_ids.quantity_done = 2.0
picking.button_validate()
move_lines += picking.move_lines
move_lines += picking.move_ids
wiz = self.env["account.sale.stock.report.non.billed.wiz"].create(
{"date_check": fields.Date.today()}
)
@ -164,9 +164,9 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
self.po.button_confirm()
picking = self.po.picking_ids[0]
picking.action_confirm()
picking.move_lines.quantity_done = 3.0
picking.move_ids.quantity_done = 3.0
res_dict = picking.button_validate()
move_lines = picking.move_lines
move_lines = picking.move_ids
self.env["stock.backorder.confirmation"].with_context(
**res_dict["context"]
).process()
@ -176,7 +176,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
invoice.action_post()
picking = self.po.picking_ids.filtered(lambda p: p.state != "done")
picking.action_confirm()
picking.move_lines.quantity_done = 2.0
picking.move_ids.quantity_done = 2.0
picking.button_validate()
wiz = self.env["account.sale.stock.report.non.billed.wiz"].create(
{"date_check": fields.Date.today()}
@ -185,7 +185,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
domain_ids = action["domain"][0][2]
for move in move_lines:
self.assertNotIn(move.id, domain_ids)
for move in picking.move_lines:
for move in picking.move_ids:
self.assertIn(move.id, domain_ids)
inv_action = self.po.action_create_invoice()
invoice = self.env["account.move"].browse([(inv_action["res_id"])])
@ -193,7 +193,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
invoice.action_post()
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in move_lines + picking.move_lines:
for move in move_lines + picking.move_ids:
self.assertNotIn(move.id, domain_ids)
def test_07_report_move_full_invoice_return_without_update(self):
@ -202,7 +202,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
picking = self.po.picking_ids[0]
# Process pickings
picking.action_confirm()
picking.move_lines.quantity_done = 1.0
picking.move_ids.quantity_done = 1.0
picking.button_validate()
# Create invoice
inv_action = self.po.action_create_invoice()
@ -214,7 +214,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertNotIn(move.id, domain_ids)
# Return move
wiz_return_form = Form(
@ -228,7 +228,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
picking_return = self.env["stock.picking"].browse(return_id)
picking_return.move_line_ids.write({"qty_done": 1})
picking_return.button_validate()
for move in picking_return.move_lines:
for move in picking_return.move_ids:
self.assertNotIn(move.id, domain_ids)
def test_08_move_return_return_full_invoiced(self):
@ -237,7 +237,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
picking = self.po.picking_ids[0]
# Process pickings
picking.action_confirm()
picking.move_lines.quantity_done = 1.0
picking.move_ids.quantity_done = 1.0
picking.button_validate()
wiz_return_form = Form(
self.env["stock.return.picking"].with_context(
@ -268,11 +268,11 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertNotIn(move.id, domain_ids)
for move in picking_return.move_lines:
for move in picking_return.move_ids:
self.assertNotIn(move.id, domain_ids)
for move in picking_return_return.move_lines:
for move in picking_return_return.move_ids:
self.assertNotIn(move.id, domain_ids)
def test_09_move_return_return_non_invoiced(self):
@ -281,7 +281,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
picking = self.po.picking_ids[0]
# Process pickings
picking.action_confirm()
picking.move_lines.quantity_done = 1.0
picking.move_ids.quantity_done = 1.0
picking.button_validate()
wiz_return_form = Form(
self.env["stock.return.picking"].with_context(
@ -308,11 +308,11 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertNotIn(move.id, domain_ids)
for move in picking_return.move_lines:
for move in picking_return.move_ids:
self.assertNotIn(move.id, domain_ids)
for move in picking_return_return.move_lines:
for move in picking_return_return.move_ids:
self.assertIn(move.id, domain_ids)
def test_10_move_invoice_return_without_update_qty(self):
@ -321,7 +321,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
picking = self.po.picking_ids[0]
# Process pickings
picking.action_confirm()
picking.move_lines.quantity_done = 1.0
picking.move_ids.quantity_done = 1.0
picking.button_validate()
inv_action = self.po.action_create_invoice()
invoice = self.env["account.move"].browse([(inv_action["res_id"])])
@ -354,11 +354,11 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertNotIn(move.id, domain_ids)
for move in picking_return.move_lines:
for move in picking_return.move_ids:
self.assertNotIn(move.id, domain_ids)
for move in picking_return_return.move_lines:
for move in picking_return_return.move_ids:
self.assertNotIn(move.id, domain_ids)
def test_11_report_move_full_invoiced_out_of_date(self):
@ -367,7 +367,7 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
picking = self.po.picking_ids[0]
# Process pickings
picking.action_confirm()
picking.move_lines.quantity_done = 1.0
picking.move_ids.quantity_done = 1.0
picking.button_validate()
# Emulate prepaying invoice
inv_action = self.po.action_create_invoice()
@ -379,5 +379,5 @@ class TestAccountPurchaseStockReportNonBilled(common.TransactionCase):
)
action = wiz.open_at_date()
domain_ids = action["domain"][0][2]
for move in picking.move_lines:
for move in picking.move_ids:
self.assertIn(move.id, domain_ids)