-
-
Notifications
You must be signed in to change notification settings - Fork 858
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] [MIG] base_partner_sequence module #358
Conversation
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.
Runbot is Red, not sure why... because I 've tested in runbot and functionally is OK, thanks!
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.
Please add a test for creating a contact to see which reference has (it has to be the same as the parent, and the sequence mustn't increase).
"category": "Generic Modules/Base", | ||
"website": "http://www.initos.com", | ||
"depends": ["base"], | ||
"website": "http://www.tecnativa.com", |
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.
Don't change URL
partner's 'ref' | ||
""" | ||
if not vals and not partner_id: | ||
raise Exception('Either field values or an id must be provided.') |
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.
Use Odoo exception
<field name="inherit_id" ref="base.view_partner_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="ref" position="attributes"> | ||
<attribute name="attrs">{ |
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.
Put this in only line for not messing up architecture view in Odoo
There's also a strange repetition of commits that you should put together |
super(ResPartner, partner).write(vals) | ||
return True | ||
|
||
@api.one |
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.
Don't use @api.one here.
abddcf3
to
be1a4a1
Compare
be1a4a1
to
3b6827f
Compare
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.
My comments are non-blocking. I don't know the answer to the base dependency question. I imagine the code is identical for 10.0, are we going to forward port when this gets approved?
|
||
:param parnter_id: id of the partner object | ||
:param vals: known field values of the partner object | ||
:return: true iff a sequence value should be assigned to the\ |
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.
typo - partner
typo - non blocking
typo - unnecessary trailing slash
"category": "Generic Modules/Base", | ||
"website": "http://www.initos.com", | ||
"depends": ["base"], |
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 know ordinarily there is an implicit dependency on base, but in this case, because the module is directly referencing base xml ids I think it would be better to explicitly state. I've only done a static review and not tested, so don't know whether this would ever actually cause a problem on a fresh database.
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.
actually, having tested in runbot, it seems that on a fresh install it will pick up base xml ids so ignore this comment if you choose.
3b6827f
to
3c52174
Compare
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 have amended last Graeme's comments and this is ready to be merged when CIs finish
3c52174
to
49e826d
Compare
Tanks @pedrobaeza |
cc @Tecnativa