Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Jan 24, 2024
1 parent 0f9d153 commit e770145
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions subscription_oca/models/sale_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ def generate_invoice(self):
order_id = self.create_sale_order()
order_id.action_done()
new_invoice = order_id._create_invoices()
self.write({"invoice_ids": [(4, new_invoice.id)]})
if self.template_id.invoicing_mode == "sale_and_invoice":
new_invoice.action_post()
new_invoice.invoice_origin = order_id.name + ", " + self.name
Expand Down
1 change: 1 addition & 0 deletions subscription_oca/tests/test_subscription_oca.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ def test_subscription_oca_sub_sale_and_invoice_send_workflow(self):

def test_subscription_oca_sub_sale_and_invoice_send_workflow_2(self):
self.sub_sale_and_invoice_send.generate_invoice()
self.assertEqual(len(self.sub_sale_and_invoice_send.invoice_ids), 2)

def test_subscription_oca_sub_stage(self):
# sale.subscription.stage
Expand Down

0 comments on commit e770145

Please sign in to comment.