In addons, website_sale module -> data folder -> data.xml you could see how the create a customer form parameter's action appears in a coding format. Also you could see website_sale module -> static folder-> src folder-> website_sale_form.xml file in which the form we can view is given in code. I just need to inherit them and create an alumni form. Could anyone please tell me the solution for it? Also suggest whether it is a good way of doing it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="any name="ir.ui.view">
<field name="name">name</field>
<field name="model">model name</field>
<field name="inherit_id" ref="module(from which you want to inherit in your case website_sale).(form id)"/>
</field>
</record>
</odoo>
In this way you can inherit existing form view . When you want to add any field in existing view you can add there by using this method.
Thanks.
Is this working for you?
Yes Perfectly. Did this many times. Isn't this working for you?
Hi Jay Dasni,
I am sorry, you should look here
The question is inter connected. You answered me for the view to be inherited that's right. But I needed the answer for creating the website form. Also you must look at these lines of codes from website_sale module -> data folder-> data.xml
<data>
<record id="sale.model_sale_order" model="ir.model">
<field name="website_form_access" eval="True"/>
<field name="website_form_label">Sales Order</field>
</record>
<function model="ir.model.fields" name="formbuilder_whitelist">
<value>sale.order</value>
<value eval="[
'client_order_ref',
]"/>
</function>
<record id="base.model_res_partner" model="ir.model">
<field name="website_form_key">create_customer</field>
<field name="website_form_access">True</field>
<field name="website_form_label">Create a Customer</field>
</record>
<function model="ir.model.fields" name="formbuilder_whitelist">
<value>res.partner</value>
<value eval="[
'name', 'phone', 'email',
'city', 'zip', 'street', 'street2', 'state_id', 'country_id',
'vat', 'company_name'
]"/>
</function>
</data>
You should look carefully in the code, before answering. Please have a look at these codes. I am not able to give any record id here. Have a look.
<data>
<record id="hr_recruitment.model_hr_applicant" model="ir.model">
<field name="website_form_key">apply_job</field>
<field name="website_form_default_field_id" ref="hr_recruitment.field_hr_applicant__description" />
<field name="website_form_access">True</field>
<field name="website_form_label">Apply for a Job</field>
</record>
<function model="ir.model.fields" name="formbuilder_whitelist">
<value>hr.applicant</value>
<value eval="[
'description',
'email_from',
'partner_name',
'partner_phone',
'job_id',
'department_id',
]"/>
</function>
</data>
This is the code from website_hr_recruitment module -> data folder ->config_data.xml
<field name="website_form_default_field_id" ref="hr_recruitment.field_hr_applicant__description" />
You can see the line here right? How the ref was given? How it was choosen and from where?
Ok. I will check this and if i will find solution I will let you know.
Thank you
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Nov 21
|
2985 | ||
|
3
Sep 21
|
4121 | ||
|
5
Sep 21
|
19029 | ||
|
0
Nov 21
|
1578 | ||
|
8
Mar 20
|
2510 |