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

[11.0] [MIG] project_billing_utils: Migrated module for v11. #27

Open
wants to merge 46 commits into
base: 11.0
Choose a base branch
from

Conversation

Chandresh-SerpentCS
Copy link
Contributor

No description provided.

jgrandguillaume and others added 30 commits June 26, 2018 12:08
(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)
…stead of aliases osv and osv_memory + remove useless imports
Introduce a hack to circumvent the check introduced in the core module hr_timesheet_invoice
(which is broken, but that is another story)
@pedrobaeza
Copy link
Member

Task timesheets invoicing has changed a lot in this version. Does this module still apply?

@Chandresh-SerpentCS
Copy link
Contributor 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, _

Choose a reason for hiding this comment

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

good to follow alphabetically ordered in imports

@@ -32,7 +19,7 @@ def associate_aal(self):
aal_obj = self.env[self.env.context['active_model']]
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})

Choose a reason for hiding this comment

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

aal_rs.timesheet_invoice_id = self.invoice_id.id is better.

Copy link
Member

@nikul-serpentcs nikul-serpentcs left a comment

Choose a reason for hiding this comment

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

Improve Code

@@ -0,0 +1,30 @@
##############################################################################
#
Copy link
Member

Choose a reason for hiding this comment

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

@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',
Copy link
Member

Choose a reason for hiding this comment

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

IMO Change website as per this

project_obj = self.env['project.project']
invoice_obj = self.env['account.invoice']

invoices = self.env['account.invoice']
Copy link
Member

Choose a reason for hiding this comment

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

IMO Remove this one Because duplicate here

[('account_id', '=', project.analytic_account_id.id)])
# If we found line linked with account we raise an error
if account_lines:
raise exceptions.Warning(
Copy link
Member

Choose a reason for hiding this comment

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

IMO here Warning is a python function, in odoo we should use UserError.

@Chandresh-SerpentCS
Copy link
Contributor Author

@nikul-serpentcs, Thanks for the review. I will workout on mentioned points and will resolve it.

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

Successfully merging this pull request may close these issues.