-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
[v10] Contracts Management - Recurring: wrong value for account ID #59
Comments
@m3dbedb similar issue here as well. @lasley
|
Is this fixed? |
I'd imagine so. Mine ended up being unrelated and I've added invoice lines since then and it seems fine. |
#92 should do the trick. Amended the commit to include this ticket |
I've just tried a locally patched version with all those 5 commit (#92) Unfortunately it doesn't fix the issue. Just to add more info, this is the error log from runbot:
|
And this is from a locally patched module:
|
@primes2h - You tested the Runbot that was built on #92? It was expired long ago and didn't have logs available, so I think you were not on it. I rebuilt and retested - invoices are generating fine. Can you please test using the Runbot that is currently available in the #92 PR and let me know replication steps if it does not work? |
@primes2h - I don't think that is a supported method of creating the invoices, because they won't contain the proper contract information. Keep in mind that this module is for automatic invoice creation, not manual. We do have a way to create the invoices for testing though (or one-off invoice creations), which will use the same processes that the cron does. You'll need to enable developer mode, then a |
You are talking about recurring invoice, and I know that works in that way "if" you select "Generate recurring invoices automatically". But it's a choice, you could need some contracts with recurring invoices (using the checkbox) and some without (leaving it blank), and add some contract invoice manually. If you try to add another contract (with no recurring invoice) the error come up as well. So it's definitely a bug. If the module is intended to be for automatic invoice creation, you should remove "Generate recurring invoice" checkbox in my opinion. |
@primes2h - The "Invoices" button is provided by the It sounds like you're going a bit outside of the admittedly tiny box that these modules cover. Would you mind elaborating a bit more on your use case? It sounds like you may be interested in the work being done to expand the scope of this repo |
If the module is intended to be for automatic recurring invoice creation (and not manual), you should remove "Generate recurring invoice" checkbox in my opinion. |
@primes2h - The issue is that contracts are analytic accounts. You are looking at an analytic account view when you're looking at the contracts, so the checkbox is required to add the automation logic to those analytic accounts. This is what the mailing list thread I referenced is about - the current design is not really that good, but it's what we have right now. We could maybe default the checkbox to |
It's also worth noting that invoices can be created and assigned to contracts, because they are analytic accounts. You'll need to enable analytic accounting though I think, because it would be on the line items of the invoices and not the invoices themselves. @pedrobaeza correct me if I'm wrong here |
It "worths" in my opinion because invoices could belong to a contract and so be grouped together. Going back to this kind of bug, what I would like to explain is that, generally speaking, a module should be self-consistent. |
This problem is caused by the module contract_show_invoice
contract/contract_show_invoice/models/invoice.py Lines 12 to 24 in c9b1e49
BTW I think this module should not be in this repository because the module links analytic info, the contract field is
|
You can reproduce the bug without that module (contract_show_invoice) installed. Anyway I tried to install it but the bug is still there, nothing changed. Anyway, I'll try to do some debug later, I hope to find something useful to fix this bug. |
@primes2h - The There is a "Show recurring invoices" link, but I was able to create an invoice using that one just fine & it linked properly. |
Wait why the hell does a module exist to add a button for invoices, when we already have a link for invoices... |
For the invoices that have that analytic account, but not coming from recurring invoicing. |
The |
Don't go through the button, but add an invoice through Accounting and select that analytic account in an invoice line. |
Ohhhhhh interesting - it looks like I did notice something though - if you create an invoice after clicking the link - it's a vendor invoice. Creating a vendor invoice will show it in the |
@carlosdauden you were absolutely right! The problem was the missing brackets. I didn't realize that I was working on another local odoo installation on which the contract_show_invoice was installed |
#99 does the trick to fix this bug |
@lasley About the last one you reported, invoices are not linked with the contract itself (Source Document field is empty). |
After installation of "Contracts Management - Recurring" module, I create contract for demo customer agrolait, and when I try to create and save invoice for the contract, odoo say
" File "C:\Program Files (x86)\Odoo 10.0\server\odoo\fields.py", line 2011, in convert_to_cache
ValueError: Wrong value for account.invoice.analytic_account_ids: 7"
Same error found in runbot of odoo community.
The text was updated successfully, but these errors were encountered: