[MIG] contract_payment_mode: Migration to 10.0#71
Conversation
pedrobaeza
left a comment
There was a problem hiding this comment.
And add the dependency on oca_repositories.txt to bank-payment
| @@ -0,0 +1,6 @@ | |||
| # -*- coding: utf-8 -*- | |||
| # Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa | |||
| @@ -0,0 +1 @@ | |||
| bank-payment No newline at end of file | |||
There was a problem hiding this comment.
oca_dependencies.txt file should be in the root, not here.
af434f7 to
b018eb9
Compare
|
@tedsalmon @lasley your mock patch in https://github.com/OCA/contract/blob/10.0/product_contract/tests/test_sale_order.py is provoking that our tests fail: https://travis-ci.org/OCA/contract/jobs/236107899#L805. Please unpatch correctly on your tearDown (it's not automatically undone as this is not a DB transaction) |
|
@pedrobaeza - why close ths? |
|
Sorry, my fault |
|
@pedrobaeza It's all green now |
| self.payment_mode_id = self.partner_id.customer_payment_mode_id.id | ||
|
|
||
| @api.model | ||
| def _prepare_invoice_data(self, contract): |
There was a problem hiding this comment.
As we have seen on v9, this method is incorrect. Correct one is _prepare_invoice (see https://github.com/OCA/contract/pull/73/files#diff-237fb5082150850f78bb85c3c23bf563R20)
| 'uom_id': self.product.uom_id.id, | ||
| })] | ||
| }) | ||
| res = self.contract._prepare_invoice_data(self.contract) |
There was a problem hiding this comment.
Test shouldn't call directly this method, but check result on the invoice after calling recurring_create_invoice. Check https://github.com/OCA/contract/pull/73/files#diff-fad070bd2b05e275bf84e1c69de78209L72
f0e0570 to
b5feb7d
Compare
|
@pedrobaeza Changes done and green already |
|
@rafaelbn please review |
* Copy partner payment mode to contracts when installing * Filter payment modes for sales * Adding tests
in recurring invoice
b5feb7d to
99497e3
Compare
Minor migration tweaks
cc @Tecnativa