<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!-- ============================================ -->
    <!-- Sale Orders (Pedidos de Venta) -->
    <!-- Asociados a Group Orders -->
    <!-- ============================================ -->

    <!-- Pedido de Ane García (Garaialde - Semanal) -->
    <record id="sale_order_ane_garcia_weekly_1" model="sale.order">
        <field name="partner_id" ref="member_ane_garcia" />
        <field name="group_order_id" ref="group_order_garaialde_weekly" />
        <field name="pickup_day">4</field>
        <!-- Friday -->
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=2)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="False" />
        <field name="state">sale</field>
        <field name="date_order" eval="(DateTime.today() - timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_ane_1_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_ane_garcia_weekly_1" />
        <field name="product_id" ref="product_manzana_ecologica" />
        <field name="product_uom_qty">2.5</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">2.50</field>
    </record>

    <record id="sale_order_line_ane_1_2" model="sale.order.line">
        <field name="order_id" ref="sale_order_ane_garcia_weekly_1" />
        <field name="product_id" ref="product_tomate_ecologico" />
        <field name="product_uom_qty">1.5</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">3.50</field>
    </record>

    <record id="sale_order_line_ane_1_3" model="sale.order.line">
        <field name="order_id" ref="sale_order_ane_garcia_weekly_1" />
        <field name="product_id" ref="product_leche_entera" />
        <field name="product_uom_qty">4.0</field>
        <field name="product_uom" ref="uom.product_uom_litre" />
        <field name="price_unit">1.80</field>
    </record>

    <record id="sale_order_line_ane_1_4" model="sale.order.line">
        <field name="order_id" ref="sale_order_ane_garcia_weekly_1" />
        <field name="product_id" ref="product_pan_integral" />
        <field name="product_uom_qty">1.0</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">3.50</field>
    </record>

    <!-- Pedido de Mikel Lopez (Garaialde - Semanal) con envío a domicilio -->
    <record id="sale_order_mikel_lopez_weekly_1" model="sale.order">
        <field name="partner_id" ref="member_mikel_lopez" />
        <field name="group_order_id" ref="group_order_garaialde_weekly" />
        <field name="pickup_day">4</field>
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=2)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="True" />
        <field name="state">sale</field>
        <field name="date_order" eval="(DateTime.today() - timedelta(days=2)).strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_mikel_1_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_mikel_lopez_weekly_1" />
        <field name="product_id" ref="product_lechuga_km0" />
        <field name="product_uom_qty">2.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">1.50</field>
    </record>

    <record id="sale_order_line_mikel_1_2" model="sale.order.line">
        <field name="order_id" ref="sale_order_mikel_lopez_weekly_1" />
        <field name="product_id" ref="product_yogur_natural" />
        <field name="product_uom_qty">3.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">3.20</field>
    </record>

    <record id="sale_order_line_mikel_1_3" model="sale.order.line">
        <field name="order_id" ref="sale_order_mikel_lopez_weekly_1" />
        <field name="product_id" ref="product_home_delivery_service" />
        <field name="product_uom_qty">1.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">5.00</field>
    </record>

    <!-- Pedido de Leire Martínez (Garaialde - Semanal) -->
    <record id="sale_order_leire_martinez_weekly_1" model="sale.order">
        <field name="partner_id" ref="member_leire_martinez" />
        <field name="group_order_id" ref="group_order_garaialde_weekly" />
        <field name="pickup_day">4</field>
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=2)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="False" />
        <field name="state">draft</field>
        <field name="date_order" eval="DateTime.today().strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_leire_1_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_leire_martinez_weekly_1" />
        <field name="product_id" ref="product_naranja_valenciana" />
        <field name="product_uom_qty">3.0</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">2.80</field>
    </record>

    <record id="sale_order_line_leire_1_2" model="sale.order.line">
        <field name="order_id" ref="sale_order_leire_martinez_weekly_1" />
        <field name="product_id" ref="product_queso_idiazabal" />
        <field name="product_uom_qty">0.5</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">25.00</field>
    </record>

    <!-- Pedido de Jon Fernández (Lamiakada - Quincenal) -->
    <record id="sale_order_jon_fernandez_biweekly_1" model="sale.order">
        <field name="partner_id" ref="member_jon_fernandez" />
        <field name="group_order_id" ref="group_order_lamiakada_biweekly" />
        <field name="pickup_day">5</field>
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=3)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="False" />
        <field name="state">sale</field>
        <field name="date_order" eval="(DateTime.today() - timedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_jon_1_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_jon_fernandez_biweekly_1" />
        <field name="product_id" ref="product_bonito_conserva" />
        <field name="product_uom_qty">3.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">12.50</field>
    </record>

    <record id="sale_order_line_jon_1_2" model="sale.order.line">
        <field name="order_id" ref="sale_order_jon_fernandez_biweekly_1" />
        <field name="product_id" ref="product_pimientos_piquillo" />
        <field name="product_uom_qty">2.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">5.80</field>
    </record>

    <record id="sale_order_line_jon_1_3" model="sale.order.line">
        <field name="order_id" ref="sale_order_jon_fernandez_biweekly_1" />
        <field name="product_id" ref="product_platano_canarias" />
        <field name="product_uom_qty">2.0</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">3.20</field>
    </record>

    <!-- Pedido de Amaia Méndez (Lamiakada - Quincenal) -->
    <record id="sale_order_amaia_mendez_biweekly_1" model="sale.order">
        <field name="partner_id" ref="member_amaia_mendez" />
        <field name="group_order_id" ref="group_order_lamiakada_biweekly" />
        <field name="pickup_day">5</field>
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=3)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="False" />
        <field name="state">draft</field>
        <field name="date_order" eval="DateTime.today().strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_amaia_1_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_amaia_mendez_biweekly_1" />
        <field name="product_id" ref="product_naranja_valenciana" />
        <field name="product_uom_qty">5.0</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">2.80</field>
    </record>

    <!-- Pedido de Unai Sánchez (Eko Auzolan - Mensual) con delivery -->
    <record id="sale_order_unai_sanchez_monthly_1" model="sale.order">
        <field name="partner_id" ref="member_unai_sanchez" />
        <field name="group_order_id" ref="group_order_ekoauzolan_monthly" />
        <field name="pickup_day">0</field>
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=5)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="True" />
        <field name="state">sale</field>
        <field name="date_order" eval="(DateTime.today() - timedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_unai_1_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_unai_sanchez_monthly_1" />
        <field name="product_id" ref="product_queso_idiazabal" />
        <field name="product_uom_qty">1.0</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">25.00</field>
    </record>

    <record id="sale_order_line_unai_1_2" model="sale.order.line">
        <field name="order_id" ref="sale_order_unai_sanchez_monthly_1" />
        <field name="product_id" ref="product_bonito_conserva" />
        <field name="product_uom_qty">6.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">12.50</field>
    </record>

    <record id="sale_order_line_unai_1_3" model="sale.order.line">
        <field name="order_id" ref="sale_order_unai_sanchez_monthly_1" />
        <field name="product_id" ref="product_home_delivery_service" />
        <field name="product_uom_qty">1.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">5.00</field>
    </record>

    <!-- Pedido de Ainhoa Rodríguez (Eko Auzolan - Mensual) -->
    <record id="sale_order_ainhoa_rodriguez_monthly_1" model="sale.order">
        <field name="partner_id" ref="member_ainhoa_rodriguez" />
        <field name="group_order_id" ref="group_order_ekoauzolan_monthly" />
        <field name="pickup_day">0</field>
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=5)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="False" />
        <field name="state">draft</field>
        <field name="date_order" eval="DateTime.today().strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_ainhoa_1_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_ainhoa_rodriguez_monthly_1" />
        <field name="product_id" ref="product_pimientos_piquillo" />
        <field name="product_uom_qty">4.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">5.80</field>
    </record>

    <!-- Pedido especial de temporada (Ane - Multi-grupo) -->
    <record id="sale_order_ane_seasonal_special" model="sale.order">
        <field name="partner_id" ref="member_ane_garcia" />
        <field name="group_order_id" ref="group_order_special_seasonal" />
        <field name="pickup_day">5</field>
        <field name="pickup_date" eval="(DateTime.today() + timedelta(days=12)).strftime('%Y-%m-%d')" />
        <field name="home_delivery" eval="False" />
        <field name="state">draft</field>
        <field name="date_order" eval="DateTime.today().strftime('%Y-%m-%d %H:%M:%S')" />
        <field name="company_id" ref="base.main_company" />
    </record>

    <record id="sale_order_line_ane_seasonal_1" model="sale.order.line">
        <field name="order_id" ref="sale_order_ane_seasonal_special" />
        <field name="product_id" ref="product_tomate_ecologico" />
        <field name="product_uom_qty">5.0</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">3.50</field>
    </record>

    <record id="sale_order_line_ane_seasonal_2" model="sale.order.line">
        <field name="order_id" ref="sale_order_ane_seasonal_special" />
        <field name="product_id" ref="product_pimiento_verde" />
        <field name="product_uom_qty">2.0</field>
        <field name="product_uom" ref="uom.product_uom_kgm" />
        <field name="price_unit">4.20</field>
    </record>

    <record id="sale_order_line_ane_seasonal_3" model="sale.order.line">
        <field name="order_id" ref="sale_order_ane_seasonal_special" />
        <field name="product_id" ref="product_lechuga_km0" />
        <field name="product_uom_qty">3.0</field>
        <field name="product_uom" ref="uom.product_uom_unit" />
        <field name="price_unit">1.50</field>
    </record>

</odoo>
