Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 10.0 contract_sale_generation: Mixing apples and oranges: account.invoice().union(sale.order(11,)) #117

Closed
moylop260 opened this issue Nov 10, 2017 · 4 comments

Comments

@moylop260
Copy link

moylop260 commented Nov 10, 2017

Running the command:
~/odoo-10.0/odoo-bin -d moy6 --db-filter=^moy6$ --stop-after-init --log-level info --log-handler openerp.tools.yaml_import:DEBUG --test-enable --init agreement_account,agreement_sale,contract,contract_payment_auto,contract_payment_mode,contract_sale,contract_sale_generation,contract_show_invoice,contract_variable_quantity,product_contract,website_portal_contract

Using the fix #116

2017-11-10 05:52:24,660 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: ERROR: test_contract (odoo.addons.contract_sale_generation.tests.test_
contract_sale.TestContractSale)
2017-11-10 05:52:24,662 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: Traceback (most recent call last):
2017-11-10 05:52:24,662 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `   File "contract_sale_generation/tes
ts/test_contract_sale.py", line 66, in test_contract
2017-11-10 05:52:24,663 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `     self.contract.recurring_create_invoice()
2017-11-10 05:52:24,663 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `   File "contract/models/account_anal
ytic_account.py", line 231, in recurring_create_invoice
2017-11-10 05:52:24,663 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `     invoices |= contract.with_context(ctx)._create_invoice()
2017-11-10 05:52:24,664 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `   File "odoo-10.0/odoo/models.py", line 5128, in __or__
2017-11-10 05:52:24,664 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `     return self.union(other)
2017-11-10 05:52:24,665 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `   File "odoo-10.0/odoo/models.py", line 5137, in union
2017-11-10 05:52:24,665 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: `     raise TypeError("Mixing apples and oranges: %s.union(%s)" % (sel
f, arg))
2017-11-10 05:52:24,665 6397 ERROR openerp_test odoo.addons.contract_sale_generation.tests.test_contract_sale: TypeError: Mixing apples and oranges: account.invoice().union(sale.order(11,))

Build log https://travis-ci.org/OCA/contract/jobs/300014336#L1430

@moylop260 moylop260 changed the title [BUG] contract_sale_generation: Mixing apples and oranges: account.invoice().union(sale.order(11,)) [BUG] 10.0 contract_sale_generation: Mixing apples and oranges: account.invoice().union(sale.order(11,)) Nov 10, 2017
moylop260 added a commit that referenced this issue Nov 10, 2017
@pedrobaeza
Copy link
Member

As said in the PR, @angelmoya you shouldn't add your sales to this method. Use another method or not return any of the sales orders generated on this one.

@angelmoya
Copy link
Member

OK, I will check it.

@angelmoya
Copy link
Member

I'm working on #118

@pedrobaeza
Copy link
Member

Already fixed in #118

levkar pushed a commit to levkar/contract that referenced this issue Feb 16, 2018
levkar pushed a commit to levkar/contract that referenced this issue Feb 17, 2018
jesusVMayor pushed a commit to Comunitea/contract that referenced this issue Apr 17, 2019
sylvainvh pushed a commit to sylvainvh/contract that referenced this issue May 14, 2019
sylvainvh pushed a commit to sylvainvh/contract that referenced this issue May 27, 2019
sylvainvh pushed a commit to sylvainvh/contract that referenced this issue Apr 20, 2020
murtuzasaleh pushed a commit to SerpentConsultingServices/contract that referenced this issue Sep 30, 2020
Freni-OSI pushed a commit to ursais/contract that referenced this issue Apr 7, 2021
rousseldenis pushed a commit to acsone/contract that referenced this issue Nov 7, 2021
rousseldenis pushed a commit to acsone/contract that referenced this issue Jan 26, 2022
ntsirintanis pushed a commit to sunflowerit/contract that referenced this issue Jun 21, 2022
ntsirintanis pushed a commit to sunflowerit/contract that referenced this issue Jun 22, 2022
vibhascs pushed a commit to vibhascs/contract that referenced this issue Jan 12, 2023
baguenth pushed a commit to AmetrasIntelligence/contract that referenced this issue Jan 12, 2023
baguenth pushed a commit to AmetrasIntelligence/contract that referenced this issue Jan 12, 2023
OCA-git-bot pushed a commit to vibhascs/contract that referenced this issue Mar 21, 2023
JesusValdez96 pushed a commit to vauxoo-dev/contract that referenced this issue May 28, 2023
Boxnia pushed a commit to Ontinet-com/contract that referenced this issue May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants