| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo><data> |
| 3 |
<record id="slide_channel_view_form" model="ir.ui.view"> |
| 4 |
<field name="name">slide.channel.view.form.inherit.sale</field> |
| 5 |
<field name="model">slide.channel</field> |
| 6 |
<field name="inherit_id" ref="website_slides.view_slide_channel_form"/> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<xpath expr="//field[@name='enroll']" position="after"> |
| 9 |
<field name="product_id" |
| 10 |
invisible="enroll != 'payment'" |
| 11 |
required="enroll == 'payment'" |
| 12 |
context="{ |
| 13 |
'default_type': 'service', |
| 14 |
'default_service_tracking': 'course', |
| 15 |
'default_invoice_policy': 'order', |
| 16 |
'default_purchase_ok': False, |
| 17 |
'default_sale_ok': True, |
| 18 |
'default_website_published': True, |
| 19 |
}" |
| 20 |
/> |
| 21 |
</xpath> |
| 22 |
<xpath expr="//button[@name='action_redirect_to_members']" position="after"> |
| 23 |
<button name="action_view_sales" |
| 24 |
type="object" |
| 25 |
icon="fa-usd" |
| 26 |
class="oe_stat_button" |
| 27 |
invisible="enroll != 'payment'" |
| 28 |
groups="sales_team.group_sale_salesman"> |
| 29 |
<field name="product_sale_revenues" string="Sales" widget="statinfo"/> |
| 30 |
</button> |
| 31 |
</xpath> |
| 32 |
</field> |
| 33 |
</record> |
| 34 |
|
| 35 |
<record id="slide_channel_view_tree_report" model="ir.ui.view"> |
| 36 |
<field name="name">slide.channel.view.list.report.inherit.sale_slides</field> |
| 37 |
<field name="model">slide.channel</field> |
| 38 |
<field name="inherit_id" ref="website_slides.slide_channel_view_tree_report"/> |
| 39 |
<field name="arch" type="xml"> |
| 40 |
<field name="members_completed_count" position="after"> |
| 41 |
<field name="currency_id" column_invisible="True"/> |
| 42 |
<field name="product_sale_revenues" string="Total Revenues" sum="Total Revenues" widget="monetary"/> |
| 43 |
</field> |
| 44 |
</field> |
| 45 |
</record> |
| 46 |
|
| 47 |
<record id="slide_channel_view_kanban" model="ir.ui.view"> |
| 48 |
<field name="name">slide.channel.view.kanban.inherit.sale</field> |
| 49 |
<field name="model">slide.channel</field> |
| 50 |
<field name="inherit_id" ref="website_slides.slide_channel_view_kanban"/> |
| 51 |
<field name="arch" type="xml"> |
| 52 |
<xpath expr="//div[@name='info_avg_rating']" position="after"> |
| 53 |
<div class="d-flex" invisible="enroll != 'payment'"> |
| 54 |
<label for="product_sale_revenues" class="mb0 me-auto">Sales</label> |
| 55 |
<field class="text-nowrap" name="product_sale_revenues" widget="monetary" options="{'currency_field': 'currency_id'}"/> |
| 56 |
<field name="currency_id" invisible="True"/> |
| 57 |
</div> |
| 58 |
</xpath> |
| 59 |
</field> |
| 60 |
</record> |
| 61 |
|
| 62 |
<record id="slide_channel_view_form_add_inherit_sale_slides" model="ir.ui.view"> |
| 63 |
<field name="name">slide.channel.view.form.add.inherit.sale.slides</field> |
| 64 |
<field name="model">slide.channel</field> |
| 65 |
<field name="inherit_id" ref="website_slides.slide_channel_view_form_add"/> |
| 66 |
<field name="arch" type="xml"> |
| 67 |
<xpath expr="//field[@name='allow_comment']" position="after"> |
| 68 |
<field name="enroll" widget="radio" options="{'horizontal': true}" string="Enroll Policy"/> |
| 69 |
<field name="product_id" invisible="enroll != 'payment'" required="enroll == 'payment'" |
| 70 |
context="{ |
| 71 |
'default_type': 'service', |
| 72 |
'default_service_tracking': 'course', |
| 73 |
'default_invoice_policy': 'order', |
| 74 |
'default_purchase_ok': False, |
| 75 |
'default_sale_ok': True, |
| 76 |
'default_website_published': True, |
| 77 |
}" |
| 78 |
/> |
| 79 |
</xpath> |
| 80 |
</field> |
| 81 |
</record> |
| 82 |
</data></odoo> |