Skip to content

Commit

Permalink
[MIG] partner_time_to_pay: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Shide committed Oct 3, 2023
1 parent efb89c8 commit 1de0efd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion partner_time_to_pay/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Partner Time to Pay",
"summary": "Add receivables and payables statistics to partners",
"version": "15.0.1.2.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"development_status": "Beta",
"author": "Open Source Integrators, Odoo Community Association (OCA), Moduon",
Expand Down
4 changes: 2 additions & 2 deletions partner_time_to_pay/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def _compute_full_reconcile_payment_date(self):
if move.payment_state in in_payment_states:
if not move.full_reconcile_payment_date:
valid_accounts = move.line_ids.filtered(
lambda ml: ml.account_id.user_type_id.type
in {"receivable", "payable"}
lambda ml: ml.account_id.account_type
in {"asset_receivable", "liability_payable"}
).mapped("account_id")
reconciled_moves = (
aml_model.search(
Expand Down
5 changes: 2 additions & 3 deletions partner_time_to_pay/tests/test_partner_time_to_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ def setUp(self):
}
)
self.time_to_pay_days = 10
product = self.env.ref("product.product_product_4")
# Create invoice for last year
move_form_ly = Form(am_model.with_context(default_move_type="out_invoice"))
move_form_ly.partner_id = self.partner.child_ids[0]
move_form_ly.invoice_date = today - timedelta(days=365)
with move_form_ly.invoice_line_ids.new() as line_form_ly:
line_form_ly.product_id = product
line_form_ly.name = "Inv Line Partner Time To Pay LY"
line_form_ly.price_unit = 100.0
line_form_ly.quantity = 10.0
invoice_ly = move_form_ly.save()
Expand All @@ -50,7 +49,7 @@ def setUp(self):
move_form_ty.partner_id = self.partner.child_ids[0]
move_form_ty.invoice_date = today
with move_form_ty.invoice_line_ids.new() as line_form_ty:
line_form_ty.product_id = product
line_form_ly.name = "Inv Line Partner Time To Pay TY"
line_form_ty.price_unit = 100.0
line_form_ty.quantity = 10.0
invoice_ty = move_form_ty.save()
Expand Down

0 comments on commit 1de0efd

Please sign in to comment.