add website snippets

This commit is contained in:
Janik von Rotz committed 2023-11-20 16:38:39 +01:00
1 parent 2861fdd8a0
commit 2adc056951
11 files changed
+174

No files matched your search

+1
View File
@@ -68,6 +68,7 @@ export default ['/snippets/account.md',
'/snippets/survey.md',
'/snippets/timesheet_grid.md',
'/snippets/web.md',
'/snippets/website.md',
'/snippets/website_discount_voucher.md',
'/snippets/website_sale.md',
]
+1
View File
@@ -70,5 +70,6 @@ In Odoo everything is described as an XML document. Snippets are modificatio
## [Survey](snippets/survey.md)
## [Timesheet Grid](snippets/timesheet_grid.md)
## [Web](snippets/web.md)
## [Website](snippets/website.md)
## [Website Discount Voucher](snippets/website_discount_voucher.md)
## [Website Sale](snippets/website_sale.md)
+19
View File
@@ -1,5 +1,24 @@
# Hr Expense
## Hr Expense View Form
### Hide Payment Mode
ID: `mint_system.hr_expense.hr_expense_view_form.hide_payment_mode`
```xml
<?xml version="1.0"?>
<data inherit_id="hr_expense.hr_expense_view_form" priority="50">
<xpath expr="//label[@for='payment_mode']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//div[@id='payment_mode']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
</data>
```
Source: [snippets/hr_expense.hr_expense_view_form.hide_payment_mode.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/hr_expense.hr_expense_view_form.hide_payment_mode.xml)
### Set Group Tax Ids
ID: `mint_system.hr_expense.hr_expense_view_form.set_group_tax_ids`
```xml
+23
View File
@@ -1152,6 +1152,29 @@ ID: `mint_system.ir_model.mrp_production.x_quality_check_ids`
Source: [snippets/ir_model.mrp_production.x_quality_check_ids.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/ir_model.mrp_production.x_quality_check_ids.xml)
## Mrp Workorder
### X Finished Lot Id
ID: `mint_system.ir_model.mrp_workorder.x_finished_lot_id`
```xml
<?xml version='1.0' encoding='UTF-8' ?>
<odoo>
<record id="x_finished_lot_id" model="ir.model.fields">
<field name="field_description">Los/Serie</field>
<field name="model">mrp.workorder</field>
<field name="model_id" ref="mrp.model_mrp_workorder"/>
<field name="name">x_finished_lot_id</field>
<field name="store" eval="True"/>
<field name="readonly" eval="True"/>
<field name="copied" eval="False"/>
<field name="ttype">char</field>
<field name="related">finished_lot_id.name</field>
</record>
</odoo>
```
Source: [snippets/ir_model.mrp_workorder.x_finished_lot_id.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/ir_model.mrp_workorder.x_finished_lot_id.xml)
### X Reservation State
ID: `mint_system.ir_model.mrp_workorder.x_reservation_state`
```xml
+39
View File
@@ -566,6 +566,32 @@ ID: `mint_system.mrp.mrp_production_form_view.add_date_deadline`
```
Source: [snippets/mrp.mrp_production_form_view.add_date_deadline.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/mrp.mrp_production_form_view.add_date_deadline.xml)
### Add Origin
ID: `mint_system.mrp.mrp_production_form_view.add_origin`
```xml
<data inherit_id="mrp.mrp_production_form_view" priority="50">
<xpath expr="//group[@name='group_extra_info']//field[@name='date_planned_start']/.." position="after">
<field name="origin"/>
</xpath>
</data>
```
Source: [snippets/mrp.mrp_production_form_view.add_origin.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/mrp.mrp_production_form_view.add_origin.xml)
### Add Procurement Group Id
ID: `mint_system.mrp.mrp_production_form_view.add_procurement_group_id`
```xml
<data inherit_id="mrp.mrp_production_form_view" priority="50">
<xpath expr="//group[@name='group_extra_info']//field[@name='date_planned_start']/.." position="after">
<field name="procurement_group_id"/>
</xpath>
</data>
```
Source: [snippets/mrp.mrp_production_form_view.add_procurement_group_id.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/mrp.mrp_production_form_view.add_procurement_group_id.xml)
### Finished Move Line Ids
ID: `mint_system.mrp.mrp_production_form_view.finished_move_line_ids`
```xml
@@ -1600,6 +1626,19 @@ ID: `mint_system.mrp.view_mrp_production_workorder_form_view_filter.add_product_
```
Source: [snippets/mrp.view_mrp_production_workorder_form_view_filter.add_product_id.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/mrp.view_mrp_production_workorder_form_view_filter.add_product_id.xml)
### X Finished Lot Id
ID: `mint_system.mrp.view_mrp_production_workorder_form_view_filter.x_finished_lot_id`
```xml
<data inherit_id="mrp.view_mrp_production_workorder_form_view_filter" priority="50">
<xpath expr="//field[@name='name']" position="before">
<field name="x_finished_lot_id"/>
</xpath>
</data>
```
Source: [snippets/mrp.view_mrp_production_workorder_form_view_filter.x_finished_lot_id.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/mrp.view_mrp_production_workorder_form_view_filter.x_finished_lot_id.xml)
## View Mrp Production Work Order Search
### Add Date Planned Start Set
ID: `mint_system.mrp.view_mrp_production_work_order_search.add_date_planned_start_set`
+12
View File
@@ -7547,3 +7547,15 @@ ID: `mint_system.stock.vpicktree.x_date_order`
```
Source: [snippets/stock.vpicktree.x_date_order.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/stock.vpicktree.x_date_order.xml)
### X Vst
ID: `mint_system.stock.vpicktree.x_vst`
```xml
<?xml version="1.0"?>
<data inherit_id="stock.vpicktree" priority="50">
<xpath expr="//field[@name='origin']" position="after">
<field name="x_vst"/>
</xpath>
</data>
```
Source: [snippets/stock.vpicktree.x_vst.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/stock.vpicktree.x_vst.xml)
+17
View File
@@ -0,0 +1,17 @@
# Website
## Website Search Box Input
### Hide Search Form
ID: `mint_system.website.website_search_box_input.hide_search_form`
```xml
<?xml version="1.0"?>
<data inherit_id="website.website_search_box_input" priority="50">
<xpath expr="//form" position="attributes">
<attribute name="style">display: none;</attribute>
</xpath>
</data>
```
Source: [snippets/website.website_search_box_input.hide_search_form.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/website.website_search_box_input.hide_search_form.xml)
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<data inherit_id="website.website_search_box_input" priority="50">
<xpath expr="//form" position="attributes">
<attribute name="style">display: none;</attribute>
</xpath>
</data>
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<data inherit_id="website_sale.confirmation" priority="50">
<span t-esc="order.partner_invoice_id" position="before">
<span t-esc="order.partner_invoice_id.name" class="address-inline"/>,
</span>
<span t-esc="order.partner_shipping_id" position="before">
<span t-esc="order.partner_shipping_id.name" class="address-inline"/>,
</span>
</data>
+34
View File
@@ -87,6 +87,26 @@ ID: `mint_system.website_sale.address.show_firstname_lastname`
```
Source: [snippets/website_sale.address.show_firstname_lastname.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/website_sale.address.show_firstname_lastname.xml)
## Confirmation
### Show Shipping Name
ID: `mint_system.website_sale.confirmation.show_shipping_name`
```xml
<?xml version="1.0"?>
<data inherit_id="website_sale.confirmation" priority="50">
<span t-esc="order.partner_invoice_id" position="before">
<span t-esc="order.partner_invoice_id.name" class="address-inline"/>,
</span>
<span t-esc="order.partner_shipping_id" position="before">
<span t-esc="order.partner_shipping_id.name" class="address-inline"/>,
</span>
</data>
```
Source: [snippets/website_sale.confirmation.show_shipping_name.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/website_sale.confirmation.show_shipping_name.xml)
## Payment Confirmation Status
### Remove Communication
ID: `mint_system.website_sale.payment_confirmation_status.remove_communication`
@@ -121,6 +141,20 @@ ID: `mint_system.website_sale.products_categories.bigger_categories_button`
Source: [snippets/website_sale.products_categories.bigger_categories_button.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/website_sale.products_categories.bigger_categories_button.xml)
## Product
### Show Default Code
ID: `mint_system.website_sale.product.show_default_code`
```xml
<?xml version="1.0"?>
<data inherit_id="website_sale.product" priority="50">
<p t-field="product.description_sale" position="after">
<p t-if="product_variant.default_code" ><strong>Artikelnummer:</strong> <span t-field="product_variant.default_code"/></p>
</p>
</data>
```
Source: [snippets/website_sale.product.show_default_code.xml](https://github.com/Mint-System/Odoo-Build/tree/16.0/snippets/website_sale.product.show_default_code.xml)
### Show Product Dimension
ID: `mint_system.website_sale.product.show_product_dimension`
```xml
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<data inherit_id="website_sale.product" priority="50">
<p t-field="product.description_sale" position="after">
<p t-if="product_variant.default_code" ><strong>Artikelnummer:</strong> <span t-field="product_variant.default_code"/></p>
</p>
</data>