-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Conversation
5b050c8
to
a0f1632
Compare
crm_claim_code/models/crm_claim.py
Outdated
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): |
There was a problem hiding this comment.
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.
d6af1ef
to
849261d
Compare
LGTM 👍 |
Please squash your commits |
crm_claim_code/i18n/hr.po
Outdated
"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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same about Croatian
crm_claim_code/i18n/fr.po
Outdated
"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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same about French
crm_claim_code/i18n/es_VE.po
Outdated
"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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same about Venezuelan.
crm_claim_code/i18n/es_MX.po
Outdated
"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" |
There was a problem hiding this comment.
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', '/') == '/': |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
849261d
to
285a307
Compare
@yajo done! squashed! |
Merging as everything has been honored. |
Depends on
[MIG] crm_claim: Migration to 10.0 #170
Update manifest
Update views
Update tests
cc @Tecnativa