odoo/addons/website_sale/views/backend.xml

106 lines
5.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="product_template_search_view_website" model="ir.ui.view">
<field name="name">product.template.search.published</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='consumable']" position="after">
<separator/>
<filter string="Published" name="published" domain="[('website_published', '=', True)]"/>
</xpath>
</field>
</record>
<record id="product_template_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.template</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{'search_default_published': 1, 'default_website_published': True}</field>
</record>
<record id="view_sales_order_filter_ecommerce" model="ir.ui.view">
<field name="name">sale.order.ecommerce.search.view</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
<field name="arch" type="xml">
<search>
<filter string="From Website" name="from_website" domain="[('team_id.website_ids', '!=', False)]"/>
</search>
</field>
</record>
<record id="action_orders_ecommerce" model="ir.actions.act_window">
<field name="name">eCommerce Orders</field>
<field name="res_model">sale.order</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state', 'in', ('sale', 'done'))]</field>
<field name="context">{'show_sale': True, 'search_default_from_website': 1}</field>
<field name="search_view_id" ref="view_sales_order_filter_ecommerce"/>
<field name="help">You don't have any confirmed order from the website.</field>
</record>
<record id="action_unpaid_orders_ecommerce" model="ir.actions.act_window">
<field name="name">Unpaid eCommerce Orders</field>
<field name="res_model">sale.order</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state', '=', 'sent')]</field>
<field name="context">{'show_sale': True, 'search_default_from_website': 1}</field>
<field name="search_view_id" ref="view_sales_order_filter_ecommerce"/>
<field name="help">You don't have any unpaid order from the website.</field>
</record>
<record id="action_abandonned_orders_ecommerce" model="ir.actions.act_window">
<field name="name">Abandonned eCommerce Orders</field>
<field name="res_model">sale.order</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state', '=', 'cancel')]</field>
<field name="context">{'show_sale': True, 'search_default_from_website': 1}</field>
<field name="search_view_id" ref="view_sales_order_filter_ecommerce"/>
<field name="help">You don't have any cancelled order from the website.</field>
</record>
<record id="action_invoices_ecommerce" model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('team_id.website_ids', '!=', False)]</field>
<field name="view_id" ref="account.invoice_tree"/>
<field name="context">{'type':'out_invoice'}</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
</record>
<record id="website_product_pricelist3" model="ir.actions.act_window">
<field name="name">Pricelists</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.pricelist</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('website_id', '!=', False)]</field>
<field name="search_view_id" ref="product.product_pricelist_view_search" />
<field name="context">{"default_base":'list_price'}</field>
</record>
<menuitem id="menu_orders" name="Orders" parent="website.menu_website_configuration" sequence="2"/>
<menuitem id="menu_catalog" name="Catalog" parent="website.menu_website_configuration" sequence="3"/>
<menuitem id="menu_ecommerce_settings" parent="website.menu_website_global_configuration" name="eCommerce"/>
<!-- Orders sub-menus -->
<menuitem id="menu_orders_orders" name="Orders" parent="menu_orders" action="action_orders_ecommerce" sequence="1"/>
<menuitem id="menu_orders_unpaid_orders" name="Unpaid Orders" parent="menu_orders" action="action_unpaid_orders_ecommerce" sequence="2"/>
<menuitem id="menu_orders_abandonned_orders" name="Abandonned Orders" parent="menu_orders" action="action_abandonned_orders_ecommerce" sequence="3"/>
<menuitem id="menu_orders_invoices" name="Invoices" parent="menu_orders" action="action_invoices_ecommerce" sequence="4"/>
<!-- Catalog sub-menus -->
<menuitem id="menu_catalog_products" name="Products" parent="menu_catalog" action="product_template_action" sequence="1"/>
<menuitem id="menu_catalog_pricelists" name="Pricelists" parent="menu_catalog" action="product.product_pricelist_action2" groups="product.group_sale_pricelist" sequence="3"/>
<menuitem id="menu_catalog_categories" parent="menu_ecommerce_settings" action="product_public_category_action" sequence="2"/>
<!-- Configuration sub-menus -->
<menuitem id="menu_ecommerce_payment_acquirers" parent="menu_ecommerce_settings" name="Payment Acquirers" action="payment.action_payment_acquirer"/>
</odoo>