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

[9.0] sales_team_operating_unit #35

Merged
merged 14 commits into from
Jan 23, 2017

Conversation

JordiBForgeFlow
Copy link
Sponsor Member

No description provided.

@api.multi
@api.constrains('team_id', 'operating_unit_id')
def _check_team_operating_unit(self):
for rec in self:
Copy link
Member

Choose a reason for hiding this comment

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

This constraint has no sense. Makes a related field if you want this behavior.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

The team_id is not a required field in the lead. You might have a lead for an operating unit not associated to a sales team.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

The team_id is not a required field in the lead. You might have a lead for an operating unit not associated to a sales team.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, but if present, you're not allowing to change it, so it doesn't make too much sense to have it. Also the message is not correct. It says 'company' instead of operating unit.


* Adds the Operating Unit (OU) to the Sales Team.

* The user’s default Operating Unit (OU) is proposed at the time of creating
Copy link
Member

Choose a reason for hiding this comment

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

s/`/'



class CRMLead(models.Model):

_inherit = 'crm.lead'

@api.model
Copy link
Member

Choose a reason for hiding this comment

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

You can't add this code here, as there's no dependency to the other module. Do it in the proper module.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now, there's dependency. I think it's ok, isn't it?

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar
Copy link
Member

Choose a reason for hiding this comment

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

Don't include 2 copyright lines. Make it in one

# Groups
self.grp_sale_mngr = self.env.ref('base.group_sale_manager')
self.grp_user = self.env.ref('base.group_user')
# Company
Copy link
Member

Choose a reason for hiding this comment

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

There's no need for these comments. You can use significant variable names instead.

@AaronHForgeFlow AaronHForgeFlow mentioned this pull request Nov 2, 2016
11 tasks
@AaronHForgeFlow
Copy link
Contributor

AaronHForgeFlow commented Nov 9, 2016

As long as crm depends on sales_team, crm_operating_unit depends on sales_team_operating_unit. Consequently this PR changes crm_operating_unit to adapt the tests.

@coveralls
Copy link

coveralls commented Nov 9, 2016

Coverage Status

Coverage decreased (-0.8%) to 73.786% when pulling da757c9 on Eficent:9.0-sales_team_operating_unit into 5ab00c3 on OCA:9.0.

@coveralls
Copy link

coveralls commented Jan 17, 2017

Coverage Status

Coverage decreased (-0.8%) to 73.786% when pulling bba2ca6 on Eficent:9.0-sales_team_operating_unit into 5ab00c3 on OCA:9.0.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 73.786% when pulling bba2ca6 on Eficent:9.0-sales_team_operating_unit into 5ab00c3 on OCA:9.0.

@AaronHForgeFlow
Copy link
Contributor

AaronHForgeFlow commented Jan 17, 2017

I Don't know why coverage decreases, IMO tests cover all what this module introduces.

@pedrobaeza
Copy link
Member

Default method is not being tested:

seleccion_009

Call crm_team standard to get team
@AaronHForgeFlow
Copy link
Contributor

Thank you @pedrobaeza

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 75.081% when pulling 51b5d05 on Eficent:9.0-sales_team_operating_unit into 5ab00c3 on OCA:9.0.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 75.081% when pulling 51b5d05 on Eficent:9.0-sales_team_operating_unit into 5ab00c3 on OCA:9.0.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 75.081% when pulling 51b5d05 on Eficent:9.0-sales_team_operating_unit into 5ab00c3 on OCA:9.0.

@guewen
Copy link
Member

guewen commented Jan 23, 2017

@pedrobaeza can you reconsider your review? thanks

@JordiBForgeFlow
Copy link
Sponsor Member Author

The review from @pedrobaeza refers to the module crm, that has already been merged.

@JordiBForgeFlow JordiBForgeFlow merged commit 552dd65 into OCA:9.0 Jan 23, 2017
JordiBForgeFlow added a commit that referenced this pull request Jan 30, 2017
* [ADD] sales_team_operating_unit
JordiBForgeFlow added a commit that referenced this pull request Mar 20, 2018
* [ADD] sales_team_operating_unit
tschanzt pushed a commit to camptocamp/operating-unit that referenced this pull request May 23, 2018
* [ADD] sales_team_operating_unit
AaronHForgeFlow pushed a commit that referenced this pull request Nov 28, 2018
* [ADD] sales_team_operating_unit
alan196 pushed a commit to Jarsa-dev/operating-unit that referenced this pull request Dec 29, 2019
* [ADD] sales_team_operating_unit
alan196 pushed a commit to Jarsa-dev/operating-unit that referenced this pull request Dec 31, 2019
* [ADD] sales_team_operating_unit
alan196 referenced this pull request in Jarsa/operating-unit Feb 13, 2020
* [ADD] sales_team_operating_unit
alan196 pushed a commit to Jarsa-dev/operating-unit that referenced this pull request Oct 10, 2020
* [ADD] sales_team_operating_unit
alan196 pushed a commit to Jarsa-dev/operating-unit that referenced this pull request Oct 15, 2020
* [ADD] sales_team_operating_unit
Rajan-SCS pushed a commit to Rajan-SCS/operating-unit that referenced this pull request Jan 12, 2022
* [ADD] sales_team_operating_unit
Rajan-SCS pushed a commit to Rajan-SCS/operating-unit that referenced this pull request Jan 18, 2022
* [ADD] sales_team_operating_unit
BT-aleonard pushed a commit to BT-aleonard/operating-unit that referenced this pull request May 11, 2023
* [ADD] sales_team_operating_unit
olveracuenca pushed a commit to Jarsa-dev/operating-unit that referenced this pull request Jun 7, 2023
* [ADD] sales_team_operating_unit
alan196 referenced this pull request in Jarsa/operating-unit Jun 26, 2023
* [ADD] sales_team_operating_unit
alan196 pushed a commit to Jarsa-dev/operating-unit that referenced this pull request Jul 27, 2023
* [ADD] sales_team_operating_unit
jdidderen-nsi pushed a commit to jdidderen-nsi/operating-unit that referenced this pull request May 29, 2024
* [ADD] sales_team_operating_unit
jdidderen-nsi pushed a commit to jdidderen-nsi/operating-unit that referenced this pull request Jul 8, 2024
* [ADD] sales_team_operating_unit
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.

None yet

6 participants