Skip to content

Commit

Permalink
Merge PR #64 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
github-grap-bot committed Oct 2, 2023
2 parents 5528671 + c254e73 commit 6043097
Show file tree
Hide file tree
Showing 68 changed files with 2,329 additions and 553 deletions.
14 changes: 11 additions & 3 deletions joint_buying_base/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Joint Buying - Base",
"version": "12.0.3.0.6",
"version": "12.0.4.0.0",
"category": "GRAP - Logistics",
"author": "GRAP,La Jardinière,Hashbang",
"website": "https://github.com/grap/odoo-addons-logistics",
Expand All @@ -12,33 +12,41 @@
"base",
"mail",
# OCA
"base_geolocalize_openstreetmap",
"base_geolocalize_company",
"res_company_code",
"res_company_active",
"web_notify",
"web_view_leaflet_map_partner",
"web_widget_bokeh_chart",
# GRAP
"name_search_reset_res_partner",
],
"external_dependencies": {"python": ["openupgradelib", "geopy"]},
"external_dependencies": {"python": ["openupgradelib", "geopy", "bokeh", "pandas"]},
"data": [
"security/ir_module_category.xml",
"security/res_groups.xml",
"security/ir.model.access.csv",
"security/ir_rule.xml",
"data/ir_config_parameter.xml",
"views/menu.xml",
"views/view_res_company.xml",
"views/view_res_partner.xml",
"views/view_res_partner_category.xml",
"views/view_res_users.xml",
"views/view_res_config_settings.xml",
"views/view_joint_buying_carrier.xml",
"views/view_joint_buying_tour_type.xml",
"views/view_joint_buying_tour.xml",
"wizards/view_joint_buying_wizard_set_tour.xml",
"views/templates.xml",
],
"demo": [
"demo/res_company.xml",
"demo/res_users.xml",
"demo/res_partner_category.xml",
"demo/res_partner.xml",
"demo/joint_buying_carrier.xml",
"demo/joint_buying_tour_type.xml",
"demo/joint_buying_tour.xml",
],
"post_init_hook": "_create_joint_buying_partner_for_companies",
Expand Down
14 changes: 14 additions & 0 deletions joint_buying_base/data/ir_config_parameter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo noupdate="1">

<record id="parameter_group_name" model="ir.config_parameter">
<field name="key">joint_buying_base.group_name</field>
<field name="value">Your Group Name</field>
</record>

</odoo>
13 changes: 8 additions & 5 deletions joint_buying_base/demo/joint_buying_carrier.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@
-->
<odoo>

<record id="carrier_coolivri_lyon" model="joint.buying.carrier">
<field name="name">Coolivri Lyon</field>
<record id="carrier_coolivri_grap" model="joint.buying.carrier">
<field name="name">Coolivri GRAP</field>
<field name="is_provider" eval="False"/>
<field name="currency_id" ref="base.EUR"/>
</record>

<record id="carrier_coolivri_savoie" model="joint.buying.carrier">
<field name="name">Coolivri Savoie</field>
<field name="is_provider" eval="False"/>
<field name="currency_id" ref="base.EUR"/>
</record>

<record id="carrier_teddy_bear" model="joint.buying.carrier">
<field name="name">Teddy Bear</field>
<field name="is_provider" eval="True"/>
<record id="carrier_coolivri_chevre" model="joint.buying.carrier">
<field name="name">Coolivri Chèvre Choux</field>
<field name="is_provider" eval="False"/>
<field name="currency_id" ref="base.EUR"/>
</record>

</odoo>
180 changes: 167 additions & 13 deletions joint_buying_base/demo/joint_buying_tour.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,111 +9,265 @@
<!-- Tournée Lyon - Loire -->
<record id="tour_lyon_loire_1" model="joint.buying.tour">
<field name="name">Lyon - Loire</field>
<field name="carrier_id" ref="carrier_coolivri_lyon"/>
<field name="type_id" ref="type_lyon_loire"/>
<field name="carrier_id" ref="carrier_coolivri_grap"/>
<field name="start_date" eval="(DateTime.today() + relativedelta(day=10)).strftime('%Y-%m-%d 07:00')"/>
<field name="end_date" eval="(DateTime.today() + relativedelta(day=10)).strftime('%Y-%m-%d 11:00')"/>
</record>

<record id="tour_lyon_loire_1_line_1" model="joint.buying.tour.line">
<field name="sequence">1</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_loire_1"/>
<field name="duration" eval="40/60"/>
</record>

<record id="tour_lyon_loire_1_line_2" model="joint.buying.tour.line">
<field name="sequence">2</field>
<field name="sequence_type">journey</field>
<field name="duration" eval="55/60"/>
<field name="distance">56</field>
<field name="tour_id" ref="tour_lyon_loire_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_LSE').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_VEV').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_loire_1_line_2" model="joint.buying.tour.line">
<record id="tour_lyon_loire_1_line_3" model="joint.buying.tour.line">
<field name="sequence">3</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_loire_1"/>
<field name="duration" eval="10/60"/>
</record>s

<record id="tour_lyon_loire_1_line_4" model="joint.buying.tour.line">
<field name="sequence">4</field>
<field name="sequence_type">journey</field>
<field name="duration" eval="100/60"/>
<field name="distance">54</field>
<field name="tour_id" ref="tour_lyon_loire_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_VEV').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_CDA').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_loire_1_line_3" model="joint.buying.tour.line">
<record id="tour_lyon_loire_1_line_5" model="joint.buying.tour.line">
<field name="sequence">5</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_loire_1"/>
<field name="duration" eval="10/60"/>
</record>

<record id="tour_lyon_loire_1_line_6" model="joint.buying.tour.line">
<field name="sequence">6</field>
<field name="sequence_type">journey</field>
<field name="duration" eval="90/60"/>
<field name="distance">107</field>
<field name="tour_id" ref="tour_lyon_loire_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_CDA').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_LSE').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_loire_1_line_7" model="joint.buying.tour.line">
<field name="sequence">7</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_loire_1"/>
<field name="duration" eval="30/60"/>
</record>

<!-- Tournée Lyon - Drôme -->
<record id="tour_lyon_drome_1" model="joint.buying.tour">
<field name="name">Lyon - Drôme</field>
<field name="carrier_id" ref="carrier_coolivri_lyon"/>
<field name="type_id" ref="type_lyon_drome"/>
<field name="carrier_id" ref="carrier_coolivri_grap"/>
<field name="start_date" eval="(DateTime.today() + relativedelta(day=15)).strftime('%Y-%m-%d 07:00')"/>
<field name="end_date" eval="(DateTime.today() + relativedelta(day=15)).strftime('%Y-%m-%d 11:00')"/>
</record>

<record id="tour_lyon_drome_1_line_1" model="joint.buying.tour.line">
<field name="sequence">1</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="duration" eval="45/60"/>
</record>

<record id="tour_lyon_drome_1_line_2" model="joint.buying.tour.line">
<field name="sequence">2</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_LSE').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_C3P').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_drome_1_line_2" model="joint.buying.tour.line">
<record id="tour_lyon_drome_1_line_3" model="joint.buying.tour.line">
<field name="sequence">3</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="duration" eval="15/60"/>
</record>

<record id="tour_lyon_drome_1_line_4" model="joint.buying.tour.line">
<field name="sequence">4</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_C3P').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_CHE').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_drome_1_line_3" model="joint.buying.tour.line">
<record id="tour_lyon_drome_1_line_5" model="joint.buying.tour.line">
<field name="sequence">5</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="duration" eval="15/60"/>
</record>

<record id="tour_lyon_drome_1_line_6" model="joint.buying.tour.line">
<field name="sequence">6</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_CHE').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_TOU').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_drome_1_line_4" model="joint.buying.tour.line">
<record id="tour_lyon_drome_1_line_7" model="joint.buying.tour.line">
<field name="sequence">7</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="duration" eval="15/60"/>
</record>

<record id="tour_lyon_drome_1_line_8" model="joint.buying.tour.line">
<field name="sequence">8</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_TOU').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_LSE').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_drome_1_line_9" model="joint.buying.tour.line">
<field name="sequence">9</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_drome_1"/>
<field name="duration" eval="25/60"/>
</record>

<!-- Tournée Lyon - Savoie -->
<record id="tour_lyon_savoie_1" model="joint.buying.tour">
<field name="name">Lyon - Romagnieu</field>
<field name="carrier_id" ref="carrier_coolivri_lyon"/>
<field name="type_id" ref="type_lyon_savoie"/>
<field name="carrier_id" ref="carrier_coolivri_grap"/>
<field name="start_date" eval="(DateTime.today() + relativedelta(day=18)).strftime('%Y-%m-%d 07:00')"/>
<field name="end_date" eval="(DateTime.today() + relativedelta(day=18)).strftime('%Y-%m-%d 09:00')"/>
</record>

<record id="tour_lyon_savoie_1_line_1" model="joint.buying.tour.line">
<field name="sequence">1</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_savoie_1"/>
<field name="duration" eval="40/60"/>
</record>

<record id="tour_lyon_savoie_1_line_2" model="joint.buying.tour.line">
<field name="sequence">2</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_lyon_savoie_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_LSE').joint_buying_partner_id.id"/>
<field name="arrival_point_id" ref="place_romagnieu"/>
</record>

<record id="tour_lyon_savoie_1_line_2" model="joint.buying.tour.line">
<record id="tour_lyon_savoie_1_line_3" model="joint.buying.tour.line">
<field name="sequence">3</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_savoie_1"/>
<field name="duration" eval="30/60"/>
</record>

<record id="tour_lyon_savoie_1_line_4" model="joint.buying.tour.line">
<field name="sequence">4</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_lyon_savoie_1"/>
<field name="starting_point_id" ref="place_romagnieu"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_LSE').joint_buying_partner_id.id"/>
</record>

<record id="tour_lyon_savoie_1_line_5" model="joint.buying.tour.line">
<field name="sequence">5</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_lyon_savoie_1"/>
<field name="duration" eval="35/60"/>
</record>

<!-- Tournée Savoie -->
<record id="tour_savoie_1" model="joint.buying.tour">
<field name="name">Romagnieu - Savoie</field>
<field name="type_id" ref="type_savoie_paire"/>
<field name="carrier_id" ref="carrier_coolivri_savoie"/>
<field name="start_date" eval="(DateTime.today() + relativedelta(day=20)).strftime('%Y-%m-%d 07:00')"/>
<field name="end_date" eval="(DateTime.today() + relativedelta(day=20)).strftime('%Y-%m-%d 12:00')"/>
</record>

<record id="tours_savoie_1_line_1" model="joint.buying.tour.line">
<field name="sequence">1</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="duration" eval="20/60"/>
</record>

<record id="tours_savoie_1_line_2" model="joint.buying.tour.line">
<field name="sequence">2</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="starting_point_id" ref="place_romagnieu"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_EDC').joint_buying_partner_id.id"/>
</record>

<record id="tours_savoie_1_line_2" model="joint.buying.tour.line">
<record id="tours_savoie_1_line_3" model="joint.buying.tour.line">
<field name="sequence">3</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="duration" eval="10/60"/>
</record>

<record id="tours_savoie_1_line_4" model="joint.buying.tour.line">
<field name="sequence">4</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_EDC').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_PZI').joint_buying_partner_id.id"/>
</record>

<record id="tours_savoie_1_line_3" model="joint.buying.tour.line">
<record id="tours_savoie_1_line_5" model="joint.buying.tour.line">
<field name="sequence">5</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="duration" eval="10/60"/>
</record>

<record id="tours_savoie_1_line_6" model="joint.buying.tour.line">
<field name="sequence">6</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_PZI').joint_buying_partner_id.id"/>
<field name="arrival_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_CRB').joint_buying_partner_id.id"/>
</record>

<record id="tours_savoie_1_line_4" model="joint.buying.tour.line">
<record id="tours_savoie_1_line_7" model="joint.buying.tour.line">
<field name="sequence">7</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="duration" eval="10/60"/>
</record>

<record id="tours_savoie_1_line_8" model="joint.buying.tour.line">
<field name="sequence">8</field>
<field name="sequence_type">journey</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="starting_point_id" model="res.partner" eval="obj().env.ref('joint_buying_base.company_CRB').joint_buying_partner_id.id"/>
<field name="arrival_point_id" ref="place_romagnieu"/>
</record>

<record id="tours_savoie_1_line_9" model="joint.buying.tour.line">
<field name="sequence">9</field>
<field name="sequence_type">handling</field>
<field name="tour_id" ref="tour_savoie_1"/>
<field name="duration" eval="40/60"/>
</record>

</odoo>
Loading

0 comments on commit 6043097

Please sign in to comment.