Skip to content

Commit

Permalink
[ADD] dropoff_site_number field on the partner
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickBrun committed Jul 6, 2018
1 parent 882d83b commit 5b26df0
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions delivery_roulier/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from . import stock_picking
from . import stock_quant_package
from . import stock_pack_operation
from . import res_partner
13 changes: 13 additions & 0 deletions delivery_roulier/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# coding: utf-8
# @author Pierrick Brun <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import models, fields


class ResPartner(models.Model):
_inherit = 'res.partner'

dropoff_site_number = fields.Char(
help='the number used by the carrier to identify the dropoff site'
)
78 changes: 78 additions & 0 deletions delivery_roulier_laposte/data/delivery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,83 @@
<!-- Pas de niveau de recommandation possible: seulement assurance -->
</record>

<record id="delivery_carrier_A2P" model="delivery.carrier">
<field name="name">Colissimo Point Retrait - Relais Pickup France</field>
<field name="default_code">A2P</field>
<field name="code">A2P</field>
<field name="carrier_type">laposte</field>
<field name="product_type">service</field>
<field name="deposit_slip" eval="True"/>
</record>
<record id="A2P_laposte_carrier_opt_tmpl_NM" model="delivery.carrier.option">
<field name="readonly_flag" eval="True"/>
<field name="mandatory" eval="False"/>
<field name="by_default" eval="False"/>
<field name="carrier_id" ref="delivery_carrier_A2P"/>
<field name="tmpl_option_id" ref="delivery_roulier_laposte.carrier_opt_tmpl_NM"/>
</record>
<record id="A2P_laposte_carrier_opt_tmpl_INS" model="delivery.carrier.option">
<field name="readonly_flag" eval="True"/>
<field name="mandatory" eval="False"/>
<field name="by_default" eval="False"/>
<field name="carrier_id" ref="delivery_carrier_A2P"/>
<field name="tmpl_option_id" ref="delivery_roulier_option.carrier_opt_tmpl_INS"/>
</record>

<record id="delivery_carrier_BPR" model="delivery.carrier">
<field name="name">Colissimo Point Retrait - Bureau de Poste France</field>
<field name="default_code">BPR</field>
<field name="code">BPR</field>
<field name="carrier_type">laposte</field>
<field name="product_type">service</field>
<field name="deposit_slip" eval="True"/>
</record>
<record id="BPR_laposte_carrier_opt_tmpl_NM" model="delivery.carrier.option">
<field name="readonly_flag" eval="True"/>
<field name="mandatory" eval="False"/>
<field name="by_default" eval="False"/>
<field name="carrier_id" ref="delivery_carrier_BPR"/>
<field name="tmpl_option_id" ref="delivery_roulier_laposte.carrier_opt_tmpl_NM"/>
</record>
<record id="BPR_laposte_carrier_opt_tmpl_INS" model="delivery.carrier.option">
<field name="readonly_flag" eval="True"/>
<field name="mandatory" eval="False"/>
<field name="by_default" eval="False"/>
<field name="carrier_id" ref="delivery_carrier_BPR"/>
<field name="tmpl_option_id" ref="delivery_roulier_option.carrier_opt_tmpl_INS"/>
</record>

<record id="delivery_carrier_CMT" model="delivery.carrier">
<field name="name">Colissimo Point Retrait - Relais Pickup Europe</field>
<field name="default_code">CMT</field>
<field name="code">CMT</field>
<field name="carrier_type">laposte</field>
<field name="product_type">service</field>
<field name="deposit_slip" eval="True"/>
</record>
<record id="CMT_laposte_carrier_opt_tmpl_NM" model="delivery.carrier.option">
<field name="readonly_flag" eval="True"/>
<field name="mandatory" eval="False"/>
<field name="by_default" eval="False"/>
<field name="carrier_id" ref="delivery_carrier_CMT"/>
<field name="tmpl_option_id" ref="delivery_roulier_laposte.carrier_opt_tmpl_NM"/>
</record>

<record id="delivery_carrier_BDP" model="delivery.carrier">
<field name="name">Colissimo Point Retrait - Bureau de Poste Europe</field>
<field name="default_code">BDP</field>
<field name="code">BDP</field>
<field name="carrier_type">laposte</field>
<field name="product_type">service</field>
<field name="deposit_slip" eval="True"/>
</record>
<record id="BDP_laposte_carrier_opt_tmpl_NM" model="delivery.carrier.option">
<field name="readonly_flag" eval="True"/>
<field name="mandatory" eval="False"/>
<field name="by_default" eval="False"/>
<field name="carrier_id" ref="delivery_carrier_BDP"/>
<field name="tmpl_option_id" ref="delivery_roulier_laposte.carrier_opt_tmpl_NM"/>
</record>

</data>
</odoo>

0 comments on commit 5b26df0

Please sign in to comment.