-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
[IMP] sale_commission: Use one2many_tags widget #78
[IMP] sale_commission: Use one2many_tags widget #78
Conversation
Looks good! 👍 |
d16eeb8
to
1b3acab
Compare
This one is ready to be reviewed |
@@ -14,6 +14,19 @@ | |||
</field> | |||
</record> | |||
|
|||
<record id="invoice_line_agent_form" model="ir.ui.view"> | |||
<field name="name">account.invoice.line.agent.form</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.
"name" field are unnecessary in view definition.
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.
Yeah, but I always put them, because an empty name seems very ugly to me.
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 will not be empty in database.
If no name is defined, the name will be autogenerated with model name + type (form / search / ...)
here for exemple it will be "account.invoice.line.agent" + "form".
Exactly, what you wrote.
(but not a blocking point, it's just a cosmetic comment)
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.
Oh, I didn't know! Thanks for the info.
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.
That's a really good info!
Maybe it should be on the guidelines?
1b3acab
to
09dfdcd
Compare
@legalsylvain, remove name attribute in views |
I'm reviewing it.. but I'm noticing a few things:
Number 2. is easy to fix, but number 1. seems to be something wrong with the new widget, don't you think? Or maybe is my database? Is it working fine for you? |
I've tested too and agree with @ivantodorovich, Default agent & commission is not populating. I'll try to review what is happening there. |
@hbrunn, are you aware of this issue with defaults with your widget? |
now I am. And now it's also obvious: https://github.com/OCA/web/blob/8.0/web_widget_one2many_tags/static/src/js/web_widget_one2many_tags.js#L25 - I don't do any effort here. Simply calling |
@ssaid @ivantodorovich @pedrobaeza this is fixed in OCA/web#330 |
I've try it in last runbot build and still same error of defaults not poppulating. Or perhups I'm doing something wrong... |
if the last runbot build was built before yesterday, the fix was not included. have somebody with appropriate permissions trigger a rebuild, then it should work |
@hbrunn @jjscarafia, I launched a new build if I remember well, and my first test was also unsucessful, but I have triggered again another build. Please try when finished. |
@hbrunn, definitively it's not working. You can try here in runbot setting for example "Agent 1" on customer "Agrolait", and then making a sales order for that customer. Adding a line, commission line for "Agent 1" should be automatically populated. The same applies for invoices. |
@pedrobaeza @jjscarafia @ssaid @ivantodorovich now it should be better: OCA/web#333 |
this problem doesn't matter for my use case, so consider this my good open source deed for the week ;-) |
Thank you very much @hbrunn!
|
@jjscarafia please turn on debug mode and try again. Then you will get a better error message with a line number from the widget javascript, please post that |
Thanks @hbrunn, here it goes...
Client Error |
hmmm, so it crashes in the standard-code, weird. And the same works when you use the standard-widget? are you a bit familiar with javascript debugging? If so, please post the backtrace at this point and go up to the place where set_value is being called. What is the content of |
Sorry but I don't know almost anything about javascript.
|
@jjscarafia it should be fixed now. I also proposed to @pedrobaeza's branch pedrobaeza#1 to make it a bit more beautiful |
…isplay_name [IMP] give a display_name field to one2many_tags
Thanks @hbrunn !! It's working perfectly now! Youn can edit the record by clicking on it!! Great work |
@jjscarafia good to hear! could you thumb up OCA/web#333 then too in order to get it merged fast? |
done, thanks again! El sáb., 2 abr. 2016 a las 11:05, Holger Brunn (notifications@github.com)
|
All is working now, so I merge. |
This won't work until OCA/web#319 is merged.
UPDATE: Merged