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

[WIP][10.0] add project_timesheet_currency #272

Closed
wants to merge 7 commits into from

Conversation

dcorio
Copy link

@dcorio dcorio commented May 18, 2017

This module allows user to work on a multi-company / multi-currency project
management scenario.
The module changes the default record rules in order to let the users to work
simultaneously on projects and tasks of all the companies they're allowed to.

If the currency of the project is different from the one set on the current
company, the module takes care of the conversion based on the current currency
rate.

@dreispt dreispt added this to the 10.0 milestone May 18, 2017
@gurneyalex gurneyalex closed this May 22, 2017
@gurneyalex gurneyalex reopened this May 22, 2017
Copy link
Member

@damdam-s damdam-s left a comment

Choose a reason for hiding this comment

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

thanks.
just some "cosmetic" minor changes

<field name="global" eval="True"/>
<field name="domain_force">['|',
('company_id', '=', False),
('company_id', 'in', [c.id for c in user.company_ids]),
Copy link
Member

Choose a reason for hiding this comment

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

can be ('company_id', 'in', user.company_ids.ids)

<field name="global" eval="True"/>
<field name="domain_force">['|',
('company_id', '=', False),
('company_id', 'in', [c.id for c in user.company_ids]),
Copy link
Member

Choose a reason for hiding this comment

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

can be ('company_id', 'in', user.company_ids.ids)

self.task_USD = task_model.create(
{
'name': 'Task USD',
'user_id': self.user_fr.id,
Copy link
Member

Choose a reason for hiding this comment

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

set the project_id to self.project_USD ?


# I check that the currency conversion worked as expected and both
# amount and amount_currency fields values are correct
self.assertEqual(total_amount, -4734.5199999999995)
Copy link
Member

Choose a reason for hiding this comment

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

better use self.assertAlmostEqual(...) see here https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertAlmostEqual

same for line 150

@gurneyalex
Copy link
Member

runbot is failing because of this warning:

2017-05-18 08:44:59,431 197 WARNING openerp_test odoo.addons.base.ir.ir_model: Creating the ir.model.data task_comp_rule in module project instead of project_timesheet_currency.

damdam-s added a commit to damdam-s/project-service that referenced this pull request May 22, 2017
@damdam-s
Copy link
Member

damdam-s commented May 22, 2017

superseeded by #275
someone can close this one ?

damdam-s added a commit to damdam-s/project-service that referenced this pull request May 22, 2017
@dreispt dreispt closed this May 29, 2017
dreispt pushed a commit that referenced this pull request May 29, 2017
* [ADD] initial rev

* [IMP] per project currency cost computation

* [IMP] override default record rules

* [ADD] readme

* [IMP] dependencies

* [FIX] amount_currency computation

* [ADD] tests

* fix comments on #272

* proof read README.rst

* FIX typo in record rule

* Change some stylistic details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants