Skip to content

Commit 7d037a5

Browse files
committed
[FIX] logistic_company: fix issues 25/08 1
1 parent 7fcfe60 commit 7d037a5

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

logistic_company/data/ir_model_access.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<field name="perm_unlink" eval="False"/>
2828
<field name="perm_write" eval="True"/>
2929
</record>
30-
<record id="product_product_portal_access" model="ir.model.access">
30+
<record id="product_product_portal_access" model="ir.model.access">
3131
<field name="group_id" ref="base.group_portal"/>
3232
<field name="model_id" ref="product.model_product_product"/>
3333
<field name="name">product_product_portal_access</field>
@@ -36,4 +36,13 @@
3636
<field name="perm_unlink" eval="False"/>
3737
<field name="perm_write" eval="True"/>
3838
</record>
39+
<record id="ir_ui_view_portal_access" model="ir.model.access">
40+
<field name="group_id" ref="base.group_portal"/>
41+
<field name="model_id" ref="base.model_ir_ui_view"/>
42+
<field name="name">ir_ui_view_portal_access</field>
43+
<field name="perm_create" eval="False"/>
44+
<field name="perm_read" eval="True"/>
45+
<field name="perm_unlink" eval="False"/>
46+
<field name="perm_write" eval="False"/>
47+
</record>
3948
</odoo>

logistic_company/data/ir_ui_view.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
<field name="active" eval="True"/>
7676
<field name="arch" type="xml">
7777
<pivot string="Stock Occupation">
78-
<field name="product_id" type="measure"/>
78+
<field name="product_uom_qty" type="measure"/>
79+
<field name="product_id" type="row"/>
7980
<field name="product_uom_qty" type="col"/>
8081
</pivot>
8182
</field>
@@ -106,7 +107,7 @@
106107
<field name="arch" type="xml">
107108
<data>
108109
<xpath expr="//field[@name='order_id']" position="before">
109-
<field name="subscription_start_date" string="Date" />
110+
<field name="subscription_start_date" string="Date" filter_domain="['&amp;', ('subscription_start_date', '&lt;=', self), ('subscription_end_date', '>=', self)]"/>
110111
</xpath>
111112
</data>
112113
</field>

logistic_company/data/portal_templates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
<template id="portal_products" name="Your Products">
1515
<t t-call="portal.portal_layout">
16-
<t t-set="logged_user" t-value="request.env.user.id"/>
16+
<t t-set="logged_user" t-value="request.env.user"/>
1717

1818
<t t-call="portal.portal_searchbar">
1919
<t t-set="title">Products</t>
2020
</t>
21-
<div t-if="not request.env['stock.quant'].search([('product_id.x_owner_id', '=', logged_user.partner_id)])" class="alert alert-info">
21+
<div t-if="not request.env['stock.quant'].search(['|', ('product_id.x_owner_id', '=', logged_user.partner_id.id), ('product_id.x_owner_id', '=', logged_user.partner_id.parent_id.id)])" class="alert alert-info">
2222
There are currently no products for your account.
2323
</div>
2424
<t t-else="">
@@ -34,7 +34,7 @@
3434
<th>Packages</th>
3535
</tr>
3636
</thead>
37-
<t t-foreach="request.env['stock.quant'].search(['|', ('product_id.x_owner_id', '=', logged_user.partner_id), ('product_id.x_owner_id', '=', logged_user.partner_id.parent_id)])" t-as="stock_quant">
37+
<t t-foreach="request.env['stock.quant'].search(['|', ('product_id.x_owner_id', '=', logged_user.partner_id.id), ('product_id.x_owner_id', '=', logged_user.partner_id.parent_id.id)])" t-as="stock_quant">
3838
<tr>
3939
<th><t t-esc="stock_quant.product_id.display_name"/></th>
4040
<th><t t-esc="stock_quant.lot_id"/></th>

0 commit comments

Comments
 (0)