Skip to content

Commit 240d71c

Browse files
frva-odoovava-odoo
authored andcommitted
[ADD] 3pl_logistic_company: add new module for third-party logistic
This commit adds the 3pl_logistic_company module for companies that offer third-party warehousing and logistics services: manage client-owned inventory, warehouse operations, handling services, and transportation with full traceability and automated billing. task-4724323 closes #960 Signed-off-by: Vallaeys Valentin (vava) <[email protected]>
1 parent 3e2bc8f commit 240d71c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+7984
-0
lines changed

.weblate.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"projects": {
33
"odoo-19": [
4+
{
5+
"name": "3pl_logistic_company",
6+
"filemask": "3pl_logistic_company/i18n/*.po",
7+
"new_base": "3pl_logistic_company/i18n/3pl_logistic_company.pot"
8+
},
49
{
510
"name": "accounting_firm",
611
"filemask": "accounting_firm/i18n/*.po",

3pl_logistic_company/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
'name': '3PL Logistic Company',
3+
'author': 'Odoo S.A.',
4+
'version': '1.0',
5+
'category': 'Services',
6+
'depends': [
7+
'base_industry_data',
8+
'crm_sale_subscription',
9+
'documents_hr',
10+
'knowledge',
11+
'product_expiry',
12+
'purchase',
13+
'quality_control',
14+
'quality_mrp',
15+
'sale_management',
16+
'sale_service',
17+
'sale_subscription',
18+
'stock',
19+
'web_studio',
20+
'website',
21+
],
22+
'data': [
23+
'data/ir_model.xml',
24+
'data/ir_model_access.xml',
25+
'data/ir_attachment_pre.xml',
26+
'data/knowledge_cover.xml',
27+
'data/knowledge_article.xml',
28+
'data/knowledge_article_favorite.xml',
29+
'data/ir_model_fields.xml',
30+
'data/ir_actions_act_window.xml',
31+
'data/portal_templates.xml',
32+
'data/ir_actions_server.xml',
33+
'data/base_automation.xml',
34+
'data/x_fee_rate.xml',
35+
'data/product_category.xml',
36+
'data/uom_uom.xml',
37+
'data/product_template.xml',
38+
'data/product_product.xml',
39+
'data/product_pricelist_item.xml',
40+
'data/stock_package_type.xml',
41+
'data/sale_order_template.xml',
42+
'data/sale_order_template_line.xml',
43+
'data/stock_storage_category.xml',
44+
'data/stock_location.xml',
45+
'data/ir_ui_menu.xml',
46+
'data/ir_ui_view.xml',
47+
'data/ir_cron.xml',
48+
'data/stock_warehouse.xml',
49+
'data/res_config_settings.xml',
50+
'data/spreadsheet_dashboard.xml',
51+
'data/mail_message.xml',
52+
],
53+
'demo': [
54+
'demo/quality_point.xml',
55+
'demo/stock_location.xml',
56+
'demo/res_partner.xml',
57+
'demo/product_template.xml',
58+
'demo/qweb_view.xml',
59+
'demo/mrp_bom.xml',
60+
'demo/mrp_bom_line.xml',
61+
'demo/stock_lot.xml',
62+
'demo/website_theme_apply.xml',
63+
'demo/crm_lead.xml',
64+
'demo/stock_package.xml',
65+
'demo/x_stock_history.xml',
66+
'demo/sale_order.xml',
67+
'demo/sale_order_line.xml',
68+
'demo/sale_order_confirm.xml',
69+
'demo/stock_picking.xml',
70+
'demo/stock_move.xml',
71+
'demo/stock_move_line.xml',
72+
'demo/website.xml',
73+
],
74+
'cloc_exclude': [
75+
'data/knowledge_article.xml',
76+
'data/portal_templates.xml',
77+
'demo/qweb_view.xml',
78+
],
79+
'license': 'OPL-1',
80+
'images': ['images/main.png'],
81+
'url': "https://www.odoo.com/trial?industry&selected_app=3pl_logistic_company",
82+
'website': "https://www.odoo.com/all-industries",
83+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="base_automation_on_owner_set_change_tracking" model="base.automation">
4+
<field name="name">On Owner Set On Product</field>
5+
<field name="action_server_ids" eval="[(6, 0, [ref('action_change_product_storable_lots')])]"/>
6+
<field name="model_id" ref="product.model_product_template"/>
7+
<field name="on_change_field_ids" eval="[(6, 0, [ref('x_owner_field_product_template')])]"/>
8+
<field name="filter_domain">[('x_owner_id', '!=', False)]</field>
9+
<field name="trigger">on_change</field>
10+
</record>
11+
12+
<record id="base_automation_on_move_line_created" model="base.automation">
13+
<field name="name">On Move Line Created</field>
14+
<field name="model_id" ref="stock.model_stock_move_line"/>
15+
<field name="action_server_ids" eval="[(6, 0, [ref('action_update_move_line_owner')])]"/>
16+
<field name="trigger">on_create</field>
17+
</record>
18+
19+
<record id="base_automation_on_stock_move_changed" model="base.automation">
20+
<field name="name">On Stock Move Create</field>
21+
<field name="model_id" ref="stock.model_stock_picking"/>
22+
<field name="trigger">on_create</field>
23+
<field name="action_server_ids" eval="[(6, 0, [ref('action_update_stock_move_owner')])]"/>
24+
</record>
25+
</odoo>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="action_fee_rate_list_view" model="ir.actions.act_window">
4+
<field name="name">Fee rate list view</field>
5+
<field name="res_model">x_fee_rate</field>
6+
<field name="view_mode">list,form</field>
7+
</record>
8+
<record id="action_window_partner_see_products" model="ir.actions.act_window">
9+
<field name="name">Partner related products view</field>
10+
<field name="res_model">product.template</field>
11+
<field name="view_mode">list,form</field>
12+
<field name="domain">[('x_owner_id', '=', active_id)]</field>
13+
</record>
14+
<record id="action_window_stock_occupation_list_view" model="ir.actions.act_window">
15+
<field name="name">Stock Occupation</field>
16+
<field name="res_model">sale.order.line</field>
17+
<field name="domain">[('order_id.subscription_state', '=', '3_progress')]</field>
18+
<field name="view_mode">pivot,list</field>
19+
</record>
20+
<record id="action_window_stock_history_list_view" model="ir.actions.act_window">
21+
<field name="name">Stock History</field>
22+
<field name="res_model">x_stock_history</field>
23+
<field name="view_mode">list,pivot</field>
24+
<field name="context">{'search_default_current_month': 1}</field>
25+
</record>
26+
</odoo>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="product_route" model="ir.actions.server">
4+
<field name="name">Route displaying products</field>
5+
<field name="model_id" ref="product.model_product_product"/>
6+
<field name="state">code</field>
7+
<field name="website_published">True</field>
8+
<field name="website_path">products</field>
9+
<field name="code"><![CDATA[
10+
response = request.render('3pl_logistic_company.portal_products')
11+
]]></field>
12+
</record>
13+
<record id="action_change_product_storable_lots" model="ir.actions.server">
14+
<field name="code"><![CDATA[
15+
record.write({'is_storable': True, 'tracking': 'lot'})
16+
]]></field>
17+
<field name="model_id" ref="product.model_product_template"/>
18+
<field name="state">code</field>
19+
<field name="name">Execute Code</field>
20+
</record>
21+
<record id="action_update_move_line_owner" model="ir.actions.server">
22+
<field name="code"><![CDATA[
23+
for move_line in records:
24+
move_line['owner_id'] = move_line.product_id.x_owner_id
25+
]]></field>
26+
<field name="model_id" ref="stock.model_stock_move_line"/>
27+
<field name="state">code</field>
28+
<field name="name">Execute Code</field>
29+
</record>
30+
<record id="action_update_stock_move_owner" model="ir.actions.server">
31+
<field name="code"><![CDATA[
32+
for pick in records:
33+
first_owner = pick.move_ids[:1].product_id.x_owner_id
34+
if first_owner and all(move.product_id.x_owner_id == first_owner for move in pick.move_ids):
35+
pick.write({'owner_id': first_owner})
36+
]]></field>
37+
<field name="model_id" ref="stock.model_stock_picking"/>
38+
<field name="state">code</field>
39+
<field name="name">Execute Code</field>
40+
</record>
41+
</odoo>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="ir_attachment_1" model="ir.attachment">
4+
<field name="name">ir_attachment_1.jpg</field>
5+
<field name="datas" type="base64" file="3pl_logistic_company/static/src/binary/ir_attachment/ir_attachment_1.jpg"/>
6+
</record>
7+
<record id="ir_attachment_2" model="ir.attachment">
8+
<field name="name">ir_attachment_2.jpg</field>
9+
<field name="datas" type="base64" file="3pl_logistic_company/static/src/binary/ir_attachment/ir_attachment_2.jpg"/>
10+
<field name="public" eval="True"/>
11+
</record>
12+
<record id="ir_attachment_3" model="ir.attachment">
13+
<field name="name">ir_attachment_3.jpg</field>
14+
<field name="datas" type="base64" file="3pl_logistic_company/static/src/binary/ir_attachment/ir_attachment_3.png"/>
15+
<field name="public" eval="True"/>
16+
</record>
17+
</odoo>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="ir_cron_update_dgi_state" model="ir.cron">
4+
<field name="name">Stock History-Create Daily Records</field>
5+
<field name="interval_number">1</field>
6+
<field name="interval_type">days</field>
7+
<field name="nextcall" eval="datetime.today().date()+relativedelta(days=1,minutes=1)"/>
8+
<field name="model_id" ref="x_stock_history_model"/>
9+
<field name="state">code</field>
10+
<field name="code"><![CDATA[
11+
for sq in env['stock.quant'].search([('location_id.usage', '=', 'internal'), ('inventory_quantity_auto_apply', '&gt;', 0.0)]):
12+
sh = env['x_stock_history'].create({
13+
'x_date': datetime.datetime.today().date(),
14+
'x_history_owner_id': sq.product_tmpl_id.x_owner_id.id,
15+
'x_location_id': sq.location_id.id,
16+
'x_history_fee_rate_id': sq.location_id.x_location_fee_rate_id.id,
17+
'x_product_id': sq.product_id.id,
18+
'x_package_id': sq.package_id.id,
19+
'x_stock_lot_id': sq.lot_id.id,
20+
'x_quantity': sq.inventory_quantity_auto_apply,
21+
})
22+
sh['x_package_type'] = sh.x_package_master_container_id.package_type_id.name
23+
]]></field>
24+
</record>
25+
</odoo>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="x_fee_rate_model" model="ir.model">
4+
<field name="name">Fee Rate</field>
5+
<field name="model">x_fee_rate</field>
6+
</record>
7+
<record id="x_stock_history_model" model="ir.model">
8+
<field name="name">Stock History</field>
9+
<field name="model">x_stock_history</field>
10+
</record>
11+
</odoo>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="fee_rate_user_access" model="ir.model.access">
4+
<field name="group_id" ref="base.group_user"/>
5+
<field name="model_id" ref="x_fee_rate_model"/>
6+
<field name="name">x_fee_rate_user_access</field>
7+
<field name="perm_create" eval="True"/>
8+
<field name="perm_read" eval="True"/>
9+
<field name="perm_unlink" eval="True"/>
10+
<field name="perm_write" eval="True"/>
11+
</record>
12+
<record id="stock_history_user_access" model="ir.model.access">
13+
<field name="group_id" ref="stock.group_stock_user"/>
14+
<field name="model_id" ref="x_stock_history_model"/>
15+
<field name="name">x_stock_history_user_access</field>
16+
<field name="perm_create" eval="False"/>
17+
<field name="perm_read" eval="True"/>
18+
<field name="perm_unlink" eval="False"/>
19+
<field name="perm_write" eval="False"/>
20+
</record>
21+
<record id="stock_history_admin_access" model="ir.model.access">
22+
<field name="group_id" ref="stock.group_stock_manager"/>
23+
<field name="model_id" ref="x_stock_history_model"/>
24+
<field name="name">x_stock_history_admin_access</field>
25+
<field name="perm_create" eval="True"/>
26+
<field name="perm_read" eval="True"/>
27+
<field name="perm_unlink" eval="True"/>
28+
<field name="perm_write" eval="True"/>
29+
</record>
30+
</odoo>

0 commit comments

Comments
 (0)