[11.0] [MIG] project_billing_utils: Migrated module for v11.#27
Open
Chandresh-SerpentCS wants to merge 46 commits intoOCA:11.0from
Open
[11.0] [MIG] project_billing_utils: Migrated module for v11.#27Chandresh-SerpentCS wants to merge 46 commits intoOCA:11.0from
Chandresh-SerpentCS wants to merge 46 commits intoOCA:11.0from
Conversation
(lp:c2c-addons/6.1 rev 2)
(lp:c2c-addons/6.1 rev 4)
(lp:c2c-addons/6.1 rev 11.1.3)
(lp:c2c-addons/6.1 rev 28.1.7)
(lp:c2c-addons/6.1 rev 28.3.24)
(lp:c2c-addons/6.1 rev 28.3.29)
(lp:c2c-addons/6.1 rev 45.1.14)
(lp:c2c-addons/6.1 rev 62)
…oice creation can be customized in sub-modules (lp:c2c-addons/6.1 rev 109)
(lp:c2c-addons/6.1 rev 111)
…stead of aliases osv and osv_memory + remove useless imports
…ort was certainly based on 6.0)
…ctly to cr.execute
…hen associated line to invoice
Introduce a hack to circumvent the check introduced in the core module hr_timesheet_invoice (which is broken, but that is another story)
Member
|
Task timesheets invoicing has changed a lot in this version. Does this module still apply? |
Author
|
Yes, using this module, we can create the invoices through Analytic Account (Project). |
| from openerp import models, api, _ | ||
| from openerp import exceptions | ||
|
|
||
| from odoo import models, api, _ |
There was a problem hiding this comment.
good to follow alphabetically ordered in imports
| aal_ids = self.env.context.get('active_ids', False) | ||
| aal_rs = aal_obj.browse(aal_ids) | ||
| aal_rs.write({'invoice_id': self.invoice_id.id}) | ||
| aal_rs.write({'timesheet_invoice_id': self.invoice_id.id}) |
There was a problem hiding this comment.
aal_rs.timesheet_invoice_id = self.invoice_id.id is better.
| @@ -0,0 +1,30 @@ | |||
| ############################################################################## | |||
| # | |||
Member
There was a problem hiding this comment.
@Chandresh-SerpentCS Remove copyright from all __init__.file file.
| 'version': '11.0.1.0.0', | ||
| 'category': 'Generic Modules/Projects & Services', | ||
| 'author': "Camptocamp,Odoo Community Association (OCA)", | ||
| 'website': 'https://www.camptocamp.com', |
| project_obj = self.env['project.project'] | ||
| invoice_obj = self.env['account.invoice'] | ||
|
|
||
| invoices = self.env['account.invoice'] |
| [('account_id', '=', project.analytic_account_id.id)]) | ||
| # If we found line linked with account we raise an error | ||
| if account_lines: | ||
| raise exceptions.Warning( |
Member
There was a problem hiding this comment.
IMO here Warning is a python function, in odoo we should use UserError.
Author
|
@nikul-serpentcs, Thanks for the review. I will workout on mentioned points and will resolve it. |
1854d07 to
ee28f9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.