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

[8.0]-[BR1030]-[ADD/IMP][Reference field improvements] #208

Merged

Conversation

serpentcs-dev1
Copy link
Member

@serpentcs-dev1 serpentcs-dev1 commented Jul 3, 2017

Issue:- #184

  • Improved string Reference to "WBS"

  • Improved name_get method

  • Added origin field with text type

@elicoidal @victormartinelicocorp

Copy link
Contributor

@elicoidal elicoidal left a comment

Choose a reason for hiding this comment

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

LGTM
@victormartinelicocorp @seb-elico

@@ -40,7 +40,7 @@ def _get_default_company(self):
states={'draft': [('readonly', False)]}
)
ref = fields.Char(
'Reference',
'WBS',
required=False,
readonly=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason why r/o?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm.. I haven't changed it was already there.

But yes, I think read-only should not be there, should I remove?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure as there are some ACL based on status. I dont know if it has an impact so dont modify it here.

@elicoidal elicoidal added this to the 8.0 milestone Jul 3, 2017
@@ -269,7 +270,8 @@ def name_get(self):
result = []
for br in self:
if br.ref:
formatted_name = u'[{}] {}'.format(br.ref, br.description)
formatted_name = u'[{}][{}] {}'.format(br.ref, br.name,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@darshan-serpent What is the point of have twice the br.name? Perhaps you forgot add other field?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes you are right. I think It should be like, right?

formatted_name = u'[{}] {}'.format(br.ref, br.name, br.description)

Will do the needful, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure here but if the requirement is fulfilled, this is fine by me.

I want: [WBS][name] Description or [name] Description (if WBS empty)

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@serpentcs-dev1
Copy link
Member Author

@elicoidal @victormartinelicocorp Tested on runbot, works as expected.

The test is made with 2 BRs, one with WBS and other without it.

without_wbs
with_wbs

Copy link
Contributor

@elicoidal elicoidal left a comment

Choose a reason for hiding this comment

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

Perfect!

@elicoidal
Copy link
Contributor

@victormartinelicocorp please review again

@elicoidal elicoidal merged commit 29e0e33 into OCA:8.0 Jul 10, 2017
ruter-lyu pushed a commit to ruter-lyu/business-requirement that referenced this pull request Mar 15, 2019
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
victormmtorres pushed a commit to Tecnativa/business-requirement that referenced this pull request Jun 4, 2019
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
pedrobaeza pushed a commit to Tecnativa/business-requirement that referenced this pull request Jun 21, 2019
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
victormmtorres pushed a commit to Tecnativa/business-requirement that referenced this pull request Jun 26, 2019
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
Tardo pushed a commit to Tecnativa/business-requirement that referenced this pull request Jan 24, 2020
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
victoralmau pushed a commit to Tecnativa/business-requirement that referenced this pull request Oct 14, 2021
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
victoralmau pushed a commit to Tecnativa/business-requirement that referenced this pull request Oct 14, 2021
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
MosabWadea pushed a commit to MosabWadea/business-requirement that referenced this pull request Mar 5, 2022
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
AntoniRomera pushed a commit to AntoniRomera/business-requirement that referenced this pull request Jul 4, 2023
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
NachoAlesLopez pushed a commit to NachoAlesLopez/business-requirement that referenced this pull request Apr 28, 2024
* [8.0][BR1030][ADD][Reference field improvements]

* [IMP]Improved code
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.

None yet

3 participants