Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2124 Lượt xem

hi all

is there a way to print the delivery order with the customer address when the shipping address is not the same as customer address?

Ảnh đại diện
Huỷ bỏ

So to make things work I went to Sales->Configuration->Settings and in Quotation and Sales I switched from Invoicing and shipping addresses are always the same (Example: services companies) to Display 3 fields on sales orders: customer, invoice address, delivery address.

It added a "Delivery address" field to Customer invoice form and maybe somewhere else.

Câu trả lời hay nhất

This is how it was done in v8 when printing customer invoice:

<div class="col-xs-6">							
    <strong>Billing Address:</strong>
    <div t-if="o.partner_id.parent_id">
        <span t-field="o.partner_id.parent_id"/>
    </div>
    <div t-field="o.partner_id.name"/>
    <div t-field="o.partner_id.street"/>
    <div t-field="o.partner_id.street2"/>  
    <div>
        <span t-field="o.partner_id.city"/><span t-if="o.partner_id.state_id.code">, </span><span t-field="o.partner_id.state_id.code"/> <span t-field="o.partner_id.zip"/>
    </div>
    <div t-if="o.partner_id.country_id.code != 'US'">
        <span t-field="o.partner_id.country_id"/>
    </div>
    <div t-field="o.partner_id.vat"/>
</div>
    <div class="col-xs-6" t-if="o.address_shipping_id">
    <strong>Shipped Address:</strong>
    <div t-if="o.address_shipping_id.parent_id">
        <span t-field="o.address_shipping_id.parent_id"/>
    </div>
    <div t-field="o.address_shipping_id.name"/>
    <div t-field="o.address_shipping_id.street"/>
    <div t-field="o.address_shipping_id.street2"/>  
    <div>
        <span t-field="o.address_shipping_id.city"/><span t-if="o.address_shipping_id.state_id.code">, </span><span t-field="o.address_shipping_id.state_id.code"/> <span t-field="o.address_shipping_id.zip"/>
    </div>
    <div t-if="o.address_shipping_id.country_id.code != 'US'">
        <span t-field="o.address_shipping_id.country_id"/>
    </div>
</div>

But I don't know how to print shipping address in v10.

Ảnh đại diện
Huỷ bỏ