Skip to content

[MIG] contract_payment_mode: Migration to 10.0#71

Merged
pedrobaeza merged 7 commits into
OCA:10.0from
Tecnativa:10.0-mig-contract_payment_mode
Jun 12, 2017
Merged

[MIG] contract_payment_mode: Migration to 10.0#71
pedrobaeza merged 7 commits into
OCA:10.0from
Tecnativa:10.0-mig-contract_payment_mode

Conversation

@chienandalu

Copy link
Copy Markdown
Member

Minor migration tweaks

cc @Tecnativa

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And add the dependency on oca_repositories.txt to bank-payment

Comment thread contract_payment_mode/__init__.py Outdated
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove copyright here

@@ -0,0 +1 @@
bank-payment No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oca_dependencies.txt file should be in the root, not here.

@chienandalu chienandalu force-pushed the 10.0-mig-contract_payment_mode branch from af434f7 to b018eb9 Compare May 25, 2017 16:26
@pedrobaeza

Copy link
Copy Markdown
Member

@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)

@lasley

lasley commented Jun 1, 2017

Copy link
Copy Markdown
Contributor

@pedrobaeza - why close ths?

@pedrobaeza

Copy link
Copy Markdown
Member

Sorry, my fault

@pedrobaeza pedrobaeza reopened this Jun 1, 2017
@chienandalu

Copy link
Copy Markdown
Member Author

@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):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@chienandalu chienandalu force-pushed the 10.0-mig-contract_payment_mode branch from f0e0570 to b5feb7d Compare June 9, 2017 07:21
@chienandalu

Copy link
Copy Markdown
Member Author

@pedrobaeza Changes done and green already

@pedrobaeza

Copy link
Copy Markdown
Member

@rafaelbn please review

@rafaelbn rafaelbn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in runbot 👍

@chienandalu chienandalu force-pushed the 10.0-mig-contract_payment_mode branch from b5feb7d to 99497e3 Compare June 12, 2017 14:33
@pedrobaeza pedrobaeza merged commit 9bd1a57 into OCA:10.0 Jun 12, 2017
@pedrobaeza pedrobaeza deleted the 10.0-mig-contract_payment_mode branch June 12, 2017 14:35
@pedrobaeza pedrobaeza mentioned this pull request Jun 12, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants