[MOV] (website_)sale_stock: move customer portal directly into sale_stock
Customer portal is not dependent from website anymore. In this commit we move customer portal code related to sale stock directly in sale stock instead of website sale stock.
This commit is contained in:
committed by
Thibault Delavallée
parent
598f4f7315
commit
945b71cb2b
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
from . import report
|
||||
|
||||
@@ -33,6 +33,7 @@ You can choose flexible invoicing methods:
|
||||
'views/stock_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/account_invoice_views.xml',
|
||||
'views/sale_stock_portal_template.xml',
|
||||
'report/sale_order_report_templates.xml',
|
||||
'report/stock_report_deliveryslip.xml',
|
||||
'data/sale_stock_data.xml',
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import portal
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="portal_order_page_shipping" name="Orders Shipping Followup" inherit_id="sale.portal_order_page">
|
||||
<xpath expr="//div[@id='shipping_address']" position="inside">
|
||||
<t t-if="order.picking_ids">
|
||||
<div>
|
||||
<strong>Delivery Orders</strong>
|
||||
</div>
|
||||
<div>
|
||||
<t t-foreach="order.picking_ids.filtered(lambda picking: picking.picking_type_id.code != 'internal')" t-as="i">
|
||||
<t t-set="report_url" t-value="'/my/picking/pdf/%s?%s' % (i.id, keep_query())"/>
|
||||
<div id='picking_info'>
|
||||
<a t-att-href="report_url"><span class="fa fa-download"/></a>
|
||||
<a t-att-href="report_url"><span t-field="i.name"/></a>
|
||||
<span class="text-muted" t-field="i.date" t-options='{"widget": "date"}'/>
|
||||
<t t-if="i.state == 'done'">
|
||||
<span class="label label-success label-text-align"><i class="fa fa-fw fa-truck"/> Shipped</span>
|
||||
</t>
|
||||
<t t-if="i.state == 'partially_available'">
|
||||
<span class="label label-warning label-text-align"><i class="fa fa-fw fa-clock-o"/> Partially Available</span>
|
||||
</t>
|
||||
<t t-if="i.state == 'cancel'">
|
||||
<span class="label label-danger label-text-align"><i class="fa fa-fw fa-times"/> Cancelled</span>
|
||||
</t>
|
||||
<t t-if="i.state in ['draft', 'waiting', 'confirmed', 'assigned']">
|
||||
<span class="label label-info label-text-align"><i class="fa fa-fw fa-clock-o"/> Preparation</span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -59,7 +59,7 @@
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="portal_order_page_shipping_tracking" name="Shipping tracking on orders followup" inherit_id="website_sale_stock.portal_order_page_shipping">
|
||||
<template id="portal_order_page_shipping_tracking" name="Shipping tracking on orders followup" inherit_id="sale_stock.portal_order_page_shipping">
|
||||
<xpath expr="//div[@id='picking_info']" position="after">
|
||||
<div t-if="i.carrier_tracking_ref">
|
||||
Tracking: <span t-field="i.carrier_id.name"/>
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import main
|
||||
from . import portal
|
||||
@@ -1,37 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="portal_order_page_shipping" name="Orders Shipping Followup" inherit_id="sale.portal_order_page">
|
||||
<xpath expr="//div[@id='shipping_address']" position="inside">
|
||||
<t t-if="order.picking_ids">
|
||||
<div>
|
||||
<strong>Delivery Orders</strong>
|
||||
</div>
|
||||
<div>
|
||||
<t t-foreach="order.picking_ids.filtered(lambda picking: picking.picking_type_id.code != 'internal')" t-as="i">
|
||||
<t t-set="report_url" t-value="'/my/picking/pdf/%s?%s' % (i.id, keep_query())"/>
|
||||
<div id='picking_info'>
|
||||
<a t-att-href="report_url"><span class="fa fa-download"/></a>
|
||||
<a t-att-href="report_url"><span t-field="i.name"/></a>
|
||||
<span class="text-muted" t-field="i.date" t-options='{"widget": "date"}'/>
|
||||
<t t-if="i.state == 'done'">
|
||||
<span class="label label-success label-text-align"><i class="fa fa-fw fa-truck"/> Shipped</span>
|
||||
</t>
|
||||
<t t-if="i.state == 'partially_available'">
|
||||
<span class="label label-warning label-text-align"><i class="fa fa-fw fa-clock-o"/> Partially Available</span>
|
||||
</t>
|
||||
<t t-if="i.state == 'cancel'">
|
||||
<span class="label label-danger label-text-align"><i class="fa fa-fw fa-times"/> Cancelled</span>
|
||||
</t>
|
||||
<t t-if="i.state in ['draft', 'waiting', 'confirmed', 'assigned']">
|
||||
<span class="label label-info label-text-align"><i class="fa fa-fw fa-clock-o"/> Preparation</span>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="assets_frontend" inherit_id="website.assets_frontend" name="Website Sale Stock">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/website_sale_stock/static/src/js/website_sale_stock.js" />
|
||||
|
||||
Reference in New Issue
Block a user