odoo button definition not working before setting value to a mandatory field Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Odoo one2many field value is being written two timesOdoo conditional readonly field on One2many field disappearsFill form field with other model form value odoo 11.0Form Widget button in Odoo formUpdate the value of a field with Odoo 10How to get the value from another field when press the button saveHow to code an update for extended field using server action on Odoo 11?Update fields on the fly on odoo10 wizardHow to create Fields in tree view with a function?How to creat records in odoo tree view onclick button?
What is this word supposed to be?
All ASCII characters with a given bit count
Is it acceptable to use working hours to read general interest books?
How would I use different systems of magic when they are capable of the same effects?
Are these square matrices always diagonalisable?
Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?
Are all CP/M-80 implementations binary compatible?
What is it called when you ride around on your front wheel?
How would this chord from "Rocket Man" be analyzed?
Split coins into combinations of different denominations
Expansion//Explosion and Siren Stormtamer
Is a 5 watt UHF/VHF handheld considered QRP?
What *exactly* is electrical current, voltage, and resistance?
Map material from china not allowed to leave the country
How to open locks without disable device?
Align column where each cell has two decimals with siunitx
Why didn't the Space Shuttle bounce back into space many times as possible so that it loose lot of kinetic energy over there?
std::is_constructible on incomplete types
Why did Israel vote against lifting the American embargo on Cuba?
Is Diceware more secure than a long passphrase?
Retract an already submitted recommendation letter (written for an undergrad student)
How to translate "red flag" into Spanish?
AI positioning circles within an arc at equal distances and heights
Could moose/elk survive in the Amazon forest?
odoo button definition not working before setting value to a mandatory field
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Odoo one2many field value is being written two timesOdoo conditional readonly field on One2many field disappearsFill form field with other model form value odoo 11.0Form Widget button in Odoo formUpdate the value of a field with Odoo 10How to get the value from another field when press the button saveHow to code an update for extended field using server action on Odoo 11?Update fields on the fly on odoo10 wizardHow to create Fields in tree view with a function?How to creat records in odoo tree view onclick button?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a button say 'calc_val' when I click on the button I had to pass values to a mandatory field.But my button definition is not working while the mandatory field is empty.Only if I put some values to the mandatory field and after when I click on the button , the button works.The whole thing is in a 'wizard'
Please help.Thanks in advance.
odoo odoo-10 odoo-11
add a comment |
I have a button say 'calc_val' when I click on the button I had to pass values to a mandatory field.But my button definition is not working while the mandatory field is empty.Only if I put some values to the mandatory field and after when I click on the button , the button works.The whole thing is in a 'wizard'
Please help.Thanks in advance.
odoo odoo-10 odoo-11
add a comment |
I have a button say 'calc_val' when I click on the button I had to pass values to a mandatory field.But my button definition is not working while the mandatory field is empty.Only if I put some values to the mandatory field and after when I click on the button , the button works.The whole thing is in a 'wizard'
Please help.Thanks in advance.
odoo odoo-10 odoo-11
I have a button say 'calc_val' when I click on the button I had to pass values to a mandatory field.But my button definition is not working while the mandatory field is empty.Only if I put some values to the mandatory field and after when I click on the button , the button works.The whole thing is in a 'wizard'
Please help.Thanks in advance.
odoo odoo-10 odoo-11
odoo odoo-10 odoo-11
asked Mar 6 at 11:11
vbtvbt
453215
453215
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Because in odoo after clicking on any button create or write function called before executing the working function of your button and for create and write you have to fill mandatory fields thats why you have to fill mandatory fields before executing any button functionality.
So what's the solution ?
– vbt
Mar 6 at 11:33
add a comment |
Hello, vbt
You have to set some default value in that specific field.
After set default value, you can use that button behavior.
And if you want to change that value, they can change also.
May Help this answer.
Thank you.
Thanks for the reply but that is a wrong method to do it.Because there is a chance that the customer won't click on the button to change it's default value.
– vbt
Mar 18 at 6:47
1
You can invisible the button if that mandatory field value is empty. Means, when that mandatory field value is available then and then your button is visible.
– Avani Somaiya
Mar 18 at 8:43
add a comment |
I have done this by removing the mandatory field and then adding a validation while clicking on the final button in the wizard (For not keeping the mandatory field empty).
If any other answers are available,feel free to post.Thanks
1
Hi, try this -add a state to the record,(draft, final). Make the field mandatory in final state only. and change state from draft to final in your button click.
– Amal
Mar 18 at 7:21
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55021690%2fodoo-button-definition-not-working-before-setting-value-to-a-mandatory-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Because in odoo after clicking on any button create or write function called before executing the working function of your button and for create and write you have to fill mandatory fields thats why you have to fill mandatory fields before executing any button functionality.
So what's the solution ?
– vbt
Mar 6 at 11:33
add a comment |
Because in odoo after clicking on any button create or write function called before executing the working function of your button and for create and write you have to fill mandatory fields thats why you have to fill mandatory fields before executing any button functionality.
So what's the solution ?
– vbt
Mar 6 at 11:33
add a comment |
Because in odoo after clicking on any button create or write function called before executing the working function of your button and for create and write you have to fill mandatory fields thats why you have to fill mandatory fields before executing any button functionality.
Because in odoo after clicking on any button create or write function called before executing the working function of your button and for create and write you have to fill mandatory fields thats why you have to fill mandatory fields before executing any button functionality.
answered Mar 6 at 11:31
AkshayAkshay
1714
1714
So what's the solution ?
– vbt
Mar 6 at 11:33
add a comment |
So what's the solution ?
– vbt
Mar 6 at 11:33
So what's the solution ?
– vbt
Mar 6 at 11:33
So what's the solution ?
– vbt
Mar 6 at 11:33
add a comment |
Hello, vbt
You have to set some default value in that specific field.
After set default value, you can use that button behavior.
And if you want to change that value, they can change also.
May Help this answer.
Thank you.
Thanks for the reply but that is a wrong method to do it.Because there is a chance that the customer won't click on the button to change it's default value.
– vbt
Mar 18 at 6:47
1
You can invisible the button if that mandatory field value is empty. Means, when that mandatory field value is available then and then your button is visible.
– Avani Somaiya
Mar 18 at 8:43
add a comment |
Hello, vbt
You have to set some default value in that specific field.
After set default value, you can use that button behavior.
And if you want to change that value, they can change also.
May Help this answer.
Thank you.
Thanks for the reply but that is a wrong method to do it.Because there is a chance that the customer won't click on the button to change it's default value.
– vbt
Mar 18 at 6:47
1
You can invisible the button if that mandatory field value is empty. Means, when that mandatory field value is available then and then your button is visible.
– Avani Somaiya
Mar 18 at 8:43
add a comment |
Hello, vbt
You have to set some default value in that specific field.
After set default value, you can use that button behavior.
And if you want to change that value, they can change also.
May Help this answer.
Thank you.
Hello, vbt
You have to set some default value in that specific field.
After set default value, you can use that button behavior.
And if you want to change that value, they can change also.
May Help this answer.
Thank you.
answered Mar 9 at 5:46
Avani SomaiyaAvani Somaiya
1585
1585
Thanks for the reply but that is a wrong method to do it.Because there is a chance that the customer won't click on the button to change it's default value.
– vbt
Mar 18 at 6:47
1
You can invisible the button if that mandatory field value is empty. Means, when that mandatory field value is available then and then your button is visible.
– Avani Somaiya
Mar 18 at 8:43
add a comment |
Thanks for the reply but that is a wrong method to do it.Because there is a chance that the customer won't click on the button to change it's default value.
– vbt
Mar 18 at 6:47
1
You can invisible the button if that mandatory field value is empty. Means, when that mandatory field value is available then and then your button is visible.
– Avani Somaiya
Mar 18 at 8:43
Thanks for the reply but that is a wrong method to do it.Because there is a chance that the customer won't click on the button to change it's default value.
– vbt
Mar 18 at 6:47
Thanks for the reply but that is a wrong method to do it.Because there is a chance that the customer won't click on the button to change it's default value.
– vbt
Mar 18 at 6:47
1
1
You can invisible the button if that mandatory field value is empty. Means, when that mandatory field value is available then and then your button is visible.
– Avani Somaiya
Mar 18 at 8:43
You can invisible the button if that mandatory field value is empty. Means, when that mandatory field value is available then and then your button is visible.
– Avani Somaiya
Mar 18 at 8:43
add a comment |
I have done this by removing the mandatory field and then adding a validation while clicking on the final button in the wizard (For not keeping the mandatory field empty).
If any other answers are available,feel free to post.Thanks
1
Hi, try this -add a state to the record,(draft, final). Make the field mandatory in final state only. and change state from draft to final in your button click.
– Amal
Mar 18 at 7:21
add a comment |
I have done this by removing the mandatory field and then adding a validation while clicking on the final button in the wizard (For not keeping the mandatory field empty).
If any other answers are available,feel free to post.Thanks
1
Hi, try this -add a state to the record,(draft, final). Make the field mandatory in final state only. and change state from draft to final in your button click.
– Amal
Mar 18 at 7:21
add a comment |
I have done this by removing the mandatory field and then adding a validation while clicking on the final button in the wizard (For not keeping the mandatory field empty).
If any other answers are available,feel free to post.Thanks
I have done this by removing the mandatory field and then adding a validation while clicking on the final button in the wizard (For not keeping the mandatory field empty).
If any other answers are available,feel free to post.Thanks
answered Mar 18 at 6:49
vbtvbt
453215
453215
1
Hi, try this -add a state to the record,(draft, final). Make the field mandatory in final state only. and change state from draft to final in your button click.
– Amal
Mar 18 at 7:21
add a comment |
1
Hi, try this -add a state to the record,(draft, final). Make the field mandatory in final state only. and change state from draft to final in your button click.
– Amal
Mar 18 at 7:21
1
1
Hi, try this -add a state to the record,(draft, final). Make the field mandatory in final state only. and change state from draft to final in your button click.
– Amal
Mar 18 at 7:21
Hi, try this -add a state to the record,(draft, final). Make the field mandatory in final state only. and change state from draft to final in your button click.
– Amal
Mar 18 at 7:21
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55021690%2fodoo-button-definition-not-working-before-setting-value-to-a-mandatory-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown