564 questions
1 vote
1 answer
2k views
How can I set all form fields readonly in Odoo 17 depending on a field?
In odoo 17, I want the formview to only view and not edit based on the value of the field order_payment_state = done. Instead of adding the readonly attribute to each field, I want to write a python ...
0 votes
2 answers
91 views
django modify FormView fields before form validation
Is there a proper way to modify the form fields before validating the data on a Class Based FormView. More specifically a CreateView. Is necessary to use Class Based views 'cause I'm throwing in a ...
0 votes
1 answer
68 views
Prepopulate ModelForm in FormView with data of another form sent to the by POST method -Django
I'm trying to prepopulate a django FormView fields with data of another form (prepatory for a meeting minute creator). I made an project simplifiying and reproducing the error for better comprehension ...
0 votes
0 answers
67 views
How to Prevent Browser Back After Record Insert in ASP.NET
I'm trying to prevent the previous values shown when the user clicks the browser's back button after a record insert using ASP.NET. I know this is a classic question asked many times, but I've spent ...
0 votes
2 answers
236 views
Django CBV use Values from Modelform to Calculate other Model Fields
I am trying to make a warehouse management system with Django 3.2 based on this models: class itemtype(models.Model): item_id = models.IntegerField(primary_key=True) item_name = models....
1 vote
1 answer
1k views
Call python function in xml for set attribute of form view in odoo 13
I have a form view and I want to set the create and edit attributes to it dynamically. here is my form view record: <record model="ir.ui.view" id="estate_property_type_form">...
0 votes
1 answer
209 views
ASP.NET Formview Textbox value- Object reference not set to an instance of an object
I would like to know whether or not this control is null once the page loads before I perform another operation. At the moment it just throws the object reference error. protected void ...
0 votes
0 answers
73 views
I'd like to know how to print all the FormView screens
I added Formview screen to Dialog and dynamically added controls to Formview screen. With more control, scrolling appeared on the Formview screen. In this situation, when I try to output the Formview ...
1 vote
1 answer
359 views
How to apply paging in Django's formview?
my view.py class Formtestview(FormView): template_name = 'test.html' form_valid(self, form): 'my code to search' => 'result is object_list' page = self.request.GET....
0 votes
1 answer
92 views
Access FormView in the ItemUpdated event
When I want to modify a FormView element like below, it works fine in the DataBound event, but it doesn't work with the ItemUpdated event (and also not with the ItemUpdating event). Why is that? This ...
2 votes
1 answer
423 views
Django FormView method 'form_valid()' not working when I specify html form action
I'm trying to send this form data by POST. When I click on submit it redirects me to the <form action="{% url 'create-checkout-session' %}" specified but I never get the email. If I ...
0 votes
1 answer
712 views
How to open a form view with existing records in SAVE or VIEW mode via a button in Odoo 13?
I have a form view like this: After fill in the required fields and click the 'Confirm' button. I want to show the form view in SAVE/VIEW mode. But it just shows the Form View in EDIT mode like this:...
1 vote
1 answer
761 views
Django FormView: Add if record does not exist and update if it does exist
I created a FormView and it works fine if the user executed the process the first time. However when it is executed the second time I get an error that the record already exist. This is expected as ...
3 votes
1 answer
2k views
Use data from GET request in get_intial() and get_form_kwargs() of FormVIew
I am trying to refactor my code to inherit FormView instead of View. The view I'm working with receives values in the GET request. I retrieve the values in the get_context_data method and pass them ...
0 votes
2 answers
518 views
How to call a FORM VIEW via a button? (Odoo 13 Enterprise)
I defined a button via "Server Actions" in this FORM VIEW: And created another FORM VIEW from the submenu. Then I'd tried to call this FORM VIEW via the button, but it's not worked. So how ...