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

10.0 mig crm claim code #171

Merged
merged 2 commits into from
Oct 16, 2017
Merged

Conversation

cubells
Copy link
Member

@cubells cubells commented Sep 5, 2017

Depends on

cc @Tecnativa

@cubells cubells force-pushed the 10.0-mig-crm_claim_code branch 2 times, most recently from 5b050c8 to a0f1632 Compare September 5, 2017 18:21
@yajo yajo added this to the 10.0 milestone Sep 6, 2017
def create(self, values):
if values.get('code', '/') == '/':
values['code'] = self.env['ir.sequence'].next_by_code('crm.claim')
return super(CrmClaim, self).create(values)

@api.multi
def copy(self, default=None):
Copy link
Member

Choose a reason for hiding this comment

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

I think you can just remove this method and put copy=False. As we have a test for it, you just can try and pass the test.

@bodedra
Copy link
Member

bodedra commented Oct 5, 2017

LGTM 👍

@bodedra bodedra mentioned this pull request Oct 5, 2017
24 tasks
@pedrobaeza
Copy link
Member

Please squash your commits

"POT-Creation-Date: 2016-07-01 15:03+0000\n"
"PO-Revision-Date: 2016-05-19 09:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: Croatian (http://www.transifex.com/oca/OCA-crm-9-0/language/hr/)\n"
Copy link
Member

Choose a reason for hiding this comment

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

Same about Croatian

"POT-Creation-Date: 2016-05-20 02:44+0000\n"
"PO-Revision-Date: 2016-05-19 09:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: French (http://www.transifex.com/oca/OCA-crm-9-0/language/fr/)\n"
Copy link
Member

Choose a reason for hiding this comment

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

Same about French

"POT-Creation-Date: 2016-05-20 02:44+0000\n"
"PO-Revision-Date: 2016-05-19 09:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (Venezuela) (http://www.transifex.com/oca/OCA-crm-9-0/language/es_VE/)\n"
Copy link
Member

Choose a reason for hiding this comment

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

Same about Venezuelan.

"POT-Creation-Date: 2016-05-20 02:44+0000\n"
"PO-Revision-Date: 2016-05-19 09:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (Mexico) (http://www.transifex.com/oca/OCA-crm-9-0/language/es_MX/)\n"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you should drop the Mexican translation


return super(CrmClaim, self).copy(default)
def create(self, values):
if values.get('code', '/') == '/':
Copy link
Member

Choose a reason for hiding this comment

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

Isn't it the same to just add a default method to the code field?

Copy link
Member

Choose a reason for hiding this comment

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

No, it isn't, as it will assign a sequence and thus increment the number even if you don't save the record.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm it makes sense, then a comment should explain that. Still missing the translation problems above.

Copy link
Member

Choose a reason for hiding this comment

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

It's the technique used everywhere in Odoo, so I don't think it requires a special explanation.

@cubells
Copy link
Member Author

cubells commented Oct 16, 2017

@yajo done!

squashed!

@pedrobaeza
Copy link
Member

Merging as everything has been honored.

@pedrobaeza pedrobaeza merged commit fc17914 into OCA:10.0 Oct 16, 2017
@pedrobaeza pedrobaeza deleted the 10.0-mig-crm_claim_code branch October 16, 2017 10:19
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.

5 participants