Browse Source

Properly initialize boolean 'international' field

Now the field is correctly set on the DP Service List
for/master
Harald Welte 5 years ago
parent
commit
3c6c66a4e2
  1. 11
      data/data.xml
  2. 2
      models/dp_shipping_service.py

11
data/data.xml

@ -7,7 +7,6 @@
<field name="code">20</field>
<field name="cost_price">0.70</field>
<field name="weight">0.020</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_kb" model="delivery.carrier.dp.service">
<field name="name">Kompaktbrief</field>
@ -15,7 +14,6 @@
<field name="code">11</field>
<field name="cost_price">0.85</field>
<field name="weight">0.050</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_gb" model="delivery.carrier.dp.service">
<field name="name">Großbrief</field>
@ -23,7 +21,6 @@
<field name="code">21</field>
<field name="cost_price">1.45</field>
<field name="weight">0.500</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_mb1k" model="delivery.carrier.dp.service">
<field name="name">Maxibrief</field>
@ -31,7 +28,6 @@
<field name="code">31</field>
<field name="cost_price">2.60</field>
<field name="weight">1.000</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_mb2k" model="delivery.carrier.dp.service">
<field name="name">Maxibrief bis 2000 g + Zusatzentgelt MBf</field>
@ -39,7 +35,6 @@
<field name="code">41</field>
<field name="cost_price">4.80</field>
<field name="weight">2.000</field>
<field name="international">0</field>
</record>
@ -49,7 +44,6 @@
<field name="code">1017</field>
<field name="cost_price">3.95</field>
<field name="weight">0.050</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_gb_ein" model="delivery.carrier.dp.service">
<field name="name">Großbrief Integral + EINSCHREIBEN</field>
@ -57,7 +51,6 @@
<field name="code">1027</field>
<field name="cost_price">3.95</field>
<field name="weight">0.500</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_mb1k_ein" model="delivery.carrier.dp.service">
<field name="name">Maxibrief Integral + EINSCHREIBEN</field>
@ -65,7 +58,6 @@
<field name="code">1037</field>
<field name="cost_price">5.10</field>
<field name="weight">1.000</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_mb2k_ein" model="delivery.carrier.dp.service">
<field name="name">Maxibrief Integral + EINSCHREIBEN EINWURF + Zusatzentgelt MBf</field>
@ -73,7 +65,6 @@
<field name="code">1042</field>
<field name="cost_price">6.95</field>
<field name="weight">2.000</field>
<field name="international">0</field>
</record>
@ -83,7 +74,6 @@
<field name="code">1022</field>
<field name="cost_price">3.60</field>
<field name="weight">0.500</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_natl_mb1k_wurf" model="delivery.carrier.dp.service">
<field name="name">Maxibrief Integral + EINSCHREIBEN EINWURF</field>
@ -91,7 +81,6 @@
<field name="code">1032</field>
<field name="cost_price">4.75</field>
<field name="weight">1.000</field>
<field name="international">0</field>
</record>
<record forcecreate="True" id="dp_service_intl_sb" model="delivery.carrier.dp.service">

2
models/dp_shipping_service.py

@ -29,7 +29,7 @@ class SMCShippingDpService(models.Model):
height = fields.Integer("Height")
width = fields.Integer("Width")
length = fields.Integer("Length")
international = fields.Boolean("International", required=1)
international = fields.Boolean("International")
# extend stock.picking with fields for Shipment and Voucher ID
class SMCStockPickingDp(models.Model):

Loading…
Cancel
Save