OCA / account-budgeting

38 stars 113 forks source link

7.0: add budget_invoice and budget_crm #3

Closed lepistone closed 9 years ago

lepistone commented 10 years ago

Hi, this adds:

For details, see the __openerp__.py files in the budget, budget_invoice and budget_crm modules.

You can also check the yaml test cases to figure out how that is meant to be used.

Thanks!

lepistone commented 10 years ago

The build is red because of https://github.com/OCA/account-analytic/issues/14. Once https://github.com/OCA/account-analytic/pull/15 is merged, I'll restart the build here and we should be fine.

max3903 commented 10 years ago

Can you separate this PR by module ? 41 files is a lot to review...

Thank you.

vrenaville commented 10 years ago

LGTM :+1:

lepistone commented 10 years ago

@max3903 I understand your concern, but splitting that branch in 3 and repeating the PR now would take some time, and the branches are temporary anyway.

For next time, I agree with you, I should try and split things up a bit more.

This time, I see no problem if people review only a part of the PR if all of it is too much. Thanks!

lucmaurer commented 9 years ago

budget_crm => if we change manually the sales team => there is a bug message :

Server Traceback (most recent call last): File "/home/vrenaville/opt/camptocamp_openerp/parts/server/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/home/vrenaville/opt/camptocamp_openerp/parts/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/home/vrenaville/opt/camptocamp_openerp/parts/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, _params) File "/home/vrenaville/opt/camptocamp_openerp/parts/server/openerp/osv/osv.py", line 193, in execute_kw return self.execute(db, uid, obj, method, args, _kw or {}) File "/home/vrenaville/opt/camptocamp_openerp/parts/server/openerp/osv/osv.py", line 133, in wrapper return f(self, dbname, _args, _kwargs) File "/home/vrenaville/opt/camptocamp_openerp/parts/server/openerp/osv/osv.py", line 202, in execute res = self.execute_cr(cr, uid, obj, method, _args, _kw) File "/home/vrenaville/opt/camptocamp_openerp/parts/server/openerp/osv/osv.py", line 190, in execute_cr return getattr(object, method)(cr, uid, _args, *_kw) AttributeError: 'crm.lead' object has no attribute 'onchange_section_id'

lucmaurer commented 9 years ago

budget_crm => the split of amounts does not take in account the currency of the opportunity !

In fact, I don't know if the currency on the opportunity is a standard field or if it is a field we have add on our instance ? if not standard, I think this should be added on the core because it is very important on a multi-company environnment !

lucmaurer commented 9 years ago

budget_crm => if the field "budget_item" is fullfill, it is important to make mandatory the following fields "deadline", "duration in month", "analytic_account"

lucmaurer commented 9 years ago

budget_crm => now there is a message when you launch the "synchronisation" telling to the user that the deadline / budget_itemp / duration / analytic_account are missing => it is not good because often you have an opportunity that is on a stage having the "budget_item" (=> the sync will create budget_line) but if the stage change (if you win the project for example) => the stage change and the "budget_item" disapear => the budget_line should then be removed.....

lucmaurer commented 9 years ago

budget_invoice => when you launch the "create_invoice" wizard from the budget_line => we should add a new check box "Do you want to delete the budget line" => by default the check_box

if "true" then when the invoice has been created, the budget line should be delete

dcorio commented 9 years ago

deleting the budget line is probably "too much". there should be the possibility to "inactivate" it by changing it's state so it won't be taken into account anymore. this would be useful if you need to re-open the invoice.

vrenaville commented 9 years ago

the onchange bug refer to crm_departement module issue, PR on the departement repo : https://github.com/OCA/department/pull/19

lepistone commented 9 years ago

Hi @vrenaville I applied your fix, after cleaning it up a bit. Thanks!

yvaucher commented 9 years ago

Error in tests AttributeError: "Field 'currency_id' does not exist in object 'browse_record(crm.lead, 27)'"

vrenaville commented 9 years ago

@yvaucher the need fixing label has been fixes now, I have add the currency_id field Travis is green also now

yvaucher commented 9 years ago

:+1:

bwrsandman commented 9 years ago

LGTM :+1: