Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How to add calculated field to order.report ?

Subscribe

Get notified when there's activity on this post

This question has been flagged
openerp7
5521 Views
Avatar
Juan Jose

Good morning / afternoon / night, i am using Openerp 7.0 and i am trying to add a calculated sum of discounts to the sale objects, so i can get printed in the .rml reports, i have already added the field to the sql view but i dont find where to add the code to have it on o object in the rml report, here is my sale_order.py and my sale_order.rml, thanks in advance

from openerp import toolsfrom openerp.osv import fields, osv
class sale_report(osv.osv):
    _name = "sale.report"    _description = "Sales Orders Statistics"    _auto = False    _rec_name = 'date'    _columns = {        'date': fields.date('Date Order', readonly=True),        'date_confirm': fields.date('Date Confirm', readonly=True),        'year': fields.char('Year', size=4, readonly=True),        'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'),            ('05', 'May'), ('06', 'June'), ('07', 'July'), ('08', 'August'), ('09', 'September'),            ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True),        'day': fields.char('Day', size=128, readonly=True),        'product_id': fields.many2one('product.product', 'Product', readonly=True),        'product_uom': fields.many2one('product.uom', 'Unit of Measure', readonly=True),        'product_uom_qty': fields.float('# of Qty', readonly=True),        'total_discount':fields.float('Total Discount', readonly=True),
        'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),        'shop_id': fields.many2one('sale.shop', 'Shop', readonly=True),        'company_id': fields.many2one('res.company', 'Company', readonly=True),        'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),        'price_total': fields.float('Total Price', readonly=True),        'delay': fields.float('Commitment Delay', digits=(16,2), readonly=True),        'categ_id': fields.many2one('product.category','Category of Product', readonly=True),        'nbr': fields.integer('# of Lines', readonly=True),        'state': fields.selection([            ('draft', 'Quotation'),            ('sent', 'Quotation Sent'),            ('waiting_date', 'Waiting Schedule'),            ('manual', 'Manual In Progress'),            ('progress', 'In Progress'),            ('invoice_except', 'Invoice Exception'),            ('done', 'Done'),            ('cancel', 'Cancelled')            ], 'Order Status', readonly=True),        'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True),        'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),    }    _order = 'date desc'
    def init(self, cr):
        tools.drop_view_if_exists(cr, 'sale_report')        cr.execute("""            create or replace view sale_report as (                select                    min(l.id) as id,                    l.product_id as product_id,                    t.uom_id as product_uom,                    sum(l.product_uom_qty / u.factor * u2.factor) as product_uom_qty,                    sum(l.product_uom_qty * l.price_unit * (100.0-l.discount) / 100.0) as price_total,                    sum((product_uom_qty * price_unit) * (discount / 100)) as total_discount,                    p.default_code as product_code,                    count(*) as nbr,                    s.date_order as date,                    s.date_confirm as date_confirm,                    to_char(s.date_order, 'YYYY') as year,                    to_char(s.date_order, 'MM') as month,                    to_char(s.date_order, 'YYYY-MM-DD') as day,                    s.partner_id as partner_id,                    s.user_id as user_id,                    s.shop_id as shop_id,                    s.company_id as company_id,                    extract(epoch from avg(date_trunc('day',s.date_confirm)-date_trunc('day',s.create_date)))/(24*60*60)::decimal(16,2) as delay,                    s.state,                    t.categ_id as categ_id,                    s.pricelist_id as pricelist_id,                    s.project_id as analytic_account_id                from                    sale_order_line l                      join sale_order s on (l.order_id=s.id)                         left join product_product p on (l.product_id=p.id)                            left join product_template t on (p.product_tmpl_id=t.id)                    left join product_uom u on (u.id=l.product_uom)                    left join product_uom u2 on (u2.id=t.uom_id)                group by                    l.product_id,                    p.default_code,                    l.order_id,                    t.uom_id,                    t.categ_id,                    s.date_order,                    s.date_confirm,                    s.partner_id,                    s.user_id,                    s.shop_id,                    s.company_id,                    s.state,                    s.pricelist_id,                    s.project_id            )        """)sale_report()
<?xml version="1.0"?><document filename="Sales Order.pdf">    <template title="Sales Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">        <pageTemplate id="first">            <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>        </pageTemplate>    </template>    <stylesheet>        <blockTableStyle id="Standard_Outline">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>        </blockTableStyle>        <blockTableStyle id="Table1">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>        </blockTableStyle>        <blockTableStyle id="Table2">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>            <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>        </blockTableStyle>        <blockTableStyle id="Table3">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>            <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>            <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>            <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>        </blockTableStyle>        <blockTableStyle id="Table4">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>            <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>            <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>            <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>            <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>            <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>            <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>        </blockTableStyle>        <blockTableStyle id="Table5">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>        </blockTableStyle>        <blockTableStyle id="T1">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>        </blockTableStyle>        <blockTableStyle id="Table6">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>            <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>            <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>            <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>            <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>            <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/>            <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/>        </blockTableStyle>        <blockTableStyle id="Table7">            <blockAlignment value="LEFT"/>            <blockValign value="TOP"/>        </blockTableStyle>        <initialize>            <paraStyle name="all" alignment="justify"/>        </initialize>        <paraStyle name="terp_header" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0"                   spaceAfter="6.0"/>        <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0"                   spaceAfter="0.0"/>        <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0"                   spaceAfter="0.0"/>        <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0"                   spaceAfter="0.0"/>        <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0"                   spaceAfter="6.0"/>        <paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0"                   spaceAfter="0.0"/>        <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0"                   spaceAfter="6.0"/>        <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0"                   spaceAfter="6.0"/>        <paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0"                   spaceAfter="6.0"/>        <paraStyle name="terp_default_Centre_9" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0"                   spaceAfter="0.0"/>        <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0"                   spaceAfter="0.0"/>        <paraStyle name="terp_default_1" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0"                   spaceAfter="0.0"/>        <paraStyle name="terp_default_Right_9_Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0"                   spaceAfter="0.0"/>        <images/>    </stylesheet>    <story>        <para style="terp_default_8">[[repeatIn(objects,'o')]]</para>        <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>        <para style="terp_default_8">            <font color="white"></font>        </para>        <para style="terp_default_8">            <font color="white"></font>        </para>        <blockTable colWidths="265.0,51.0,225.0" style="Table1">            <tr>                <td>                    <para style="terp_default_Bold_9">                        <b>Shipping address :</b>                    </para>                    <para style="terp_default_9">[[ (o.partner_shipping_id and o.partner_id.title and                        o.partner_shipping_id.title.name) or '' ]] [[ (o.partner_shipping_id and                        o.partner_shipping_id.name) or '' ]]                    </para>                    <para style="terp_default_9">[[ o.partner_shipping_id and display_address(o.partner_shipping_id)                        ]]                    </para>                    <para style="terp_default_9">                        <font color="white"></font>                    </para>                    <para style="terp_default_Bold_9">                        <b>Invoice address :</b>                    </para>                    <para style="terp_default_9">[[ (o.partner_invoice_id and o.partner_invoice_id.title and                        o.partner_invoice_id.title.name) or '' ]] [[ (o.partner_invoice_id and                        o.partner_invoice_id.name) or '' ]]                    </para>                    <para style="terp_default_9">[[ o.partner_invoice_id and display_address(o.partner_invoice_id) ]]                    </para>                </td>                <td>                    <para style="terp_default_8">                        <font color="white"></font>                    </para>                </td>                <td>                    <para style="terp_default_9">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or                        '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]                    </para>                    <para style="terp_default_9">[[ o.partner_id and display_address(o.partner_id) ]]</para>                    <para style="terp_default_9">                        <font color="white"></font>                    </para>                    <para style="terp_default_9">Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]]</para>                    <para style="terp_default_9">Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]]</para>                    <para style="terp_default_9">TVA : [[ (o.partner_id.vat) or removeParentNode('para') ]]</para>                    <para style="terp_default_9">                        <font color="white"></font>                    </para>                </td>            </tr>        </blockTable>        <para style="terp_default_8">            <font color="white"></font>        </para>        <para style="terp_header">            <b>[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Quotation N° [[ o.name ]]</b>        </para>        <para style="terp_header">            <b>[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Order N° [[ o.name ]]</b>        </para>        <para style="terp_default_8">            <font color="white"></font>        </para>        <blockTable colWidths="132.0,134.0,135.0,135.0" style="Table2">            <tr>                <td>                    <para style="terp_tblheader_General_Centre">                        <b>Your Reference</b>                    </para>                </td>                <td>                    <para style="terp_tblheader_General_Centre">                        <b>[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Date Ordered</b>                    </para>                    <para style="terp_tblheader_General_Centre">                        <b>[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Quotation Date</b>                    </para>                </td>                <td>                    <para style="terp_tblheader_General_Centre">                        <b>Salesperson</b>                    </para>                </td>                <td>                    <para style="terp_tblheader_General_Centre">                        <b>Payment Term</b>                    </para>                </td>            </tr>        </blockTable>        <blockTable colWidths="132.0,134.0,135.0,135.0" style="Table3">            <tr>                <td>                    <para style="terp_default_Centre_8">[[ o.client_order_ref ]]</para>                </td>                <td>                    <para style="terp_default_Centre_8">[[ formatLang(o.date_order,date = True) ]]</para>                </td>                <td>                    <para style="terp_default_Centre_8">[[ (o.user_id and o.user_id.name) or '' ]]</para>                </td>                <td>                    <para style="terp_default_Centre_8">[[ (o.payment_term and o.payment_term.name) or '' ]]</para>                </td>            </tr>        </blockTable>        <para style="terp_default_8">            <font color="white"></font>        </para>        <pto>            <pto_header>                <blockTable colWidths="181.0,70.0,80.0,70.0,85.0" repeatRows="1" style="Table4">                    <tr>                        <td>                            <para style="terp_tblheader_Details">                                <b>Description</b>                            </para>                        </td>                        <td>                            <para style="terp_tblheader_Details_Centre">                                <b>VAT</b>                            </para>                        </td>                        <td>                            <para style="terp_tblheader_Details_Right">                                <b>Quantity</b>                            </para>                        </td>                        <td>                            <para style="terp_tblheader_Details_Right">                                <b>Unit Price</b>                            </para>                        </td>
                        <td>                            <para style="terp_tblheader_Details_Right">                                <b>Price</b>                            </para>                        </td>                    </tr>                </blockTable>            </pto_header>            <blockTable colWidths="90.0,151.0,70.0,70.0,70.0,90.0" repeatRows="1" style="Table4">                <tr>                    <td>                        <para style="terp_tblheader_Details">                            <b>Codigo</b>                        </para>
                    </td>                    <td>                        <para style="terp_tblheader_Details">                            <b>Description</b>                        </para>
                    </td>                    <td>                        <para style="terp_tblheader_Details_Right">                            <b>Quantity</b>                        </para>                    </td>                    <td>                        <para style="terp_tblheader_Details_Right">                            <b>Unidad</b>                        </para>                    </td>                    <td>                        <para style="terp_tblheader_Details_Right">                            <b>Unit Price</b>                        </para>                    </td>
                    <td>                        <para style="terp_tblheader_Details_Right">                            <b>Price</b>                        </para>                    </td>                </tr>            </blockTable>            <section>                <para style="terp_default_1">[[repeatIn(o.order_line,'line')]]</para>                <blockTable colWidths="90.0,157.0,70.0,70.0,70.0,90.0" style="Table5">                    <tr>
                        <td>                            <para style="terp_defaultt_9">[[ line.product_id.default_code ]]</para>                        </td>                        <td>                            <para style="terp_default_9">[[ format(line.name) ]]</para>                        </td>                        <td>                            <para style="terp_default_Right_9">[[ formatLang(line.product_uos_qty) ]]</para>                        </td>                        <td>                            <para style="terp_default_Right_9">[[ line.product_uom.name ]]</para>                        </td>                        <td>                            <para style="terp_default_Right_9">[[ formatLang(line.price_unit ,                                digits=get_digits(dp='Product Price'))]]                            </para>                        </td>
                        <td>                            <para style="terp_default_Right_9">[[ formatLang((line.price_unit * line.product_uos_qty),                                digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]]                            </para>                        </td>                    </tr>                </blockTable>            </section>        </pto>
        <blockValign value="TOP"/>
        <blockTable colWidths="377.0,70.0,93.0" style="Table6">            <tr>                <td>                    <para style="terp_default_9">                        <font color="white"></font>                    </para>                </td>                <td>                    <para style="terp_default_9">Subtotal :</para>                </td>                <td>                    <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, dp='Account',                        currency_obj=o.pricelist_id.currency_id) ]]                    </para>                </td>            </tr>        </blockTable>
        <blockTable colWidths="377.0,70.0,93.0" style="T1">               <section>            <tr>                <td>                    <para style="terp_default_9">                        <font color="white"></font>                    </para>                </td>                <td>                    <para style="terp_default_9">Descuento :
                    </para>                </td>                <td>                    <para style="terp_default_Right_9">[[                        formatLang(((line.price_unit * line.product_uos_qty) *                        (line.discount / 100)), dp='Account',                        currency_obj=o.pricelist_id.currency_id)]]                    </para>                </td>            </tr></section>


            <tr>                <td>                    <para style="terp_default_9">                        <font color="white"></font>                        [[ (formatLang(((line.price_unit * line.product_uos_qty) *                        (line.discount / 100)), dp='Account',                        currency_obj=o.pricelist_id.currency_id) == "$ 0.00" and removeParentNode(section) ) ]]                    </para>                </td>                <td>                    <para style="terp_default_9">IVA(16%) :</para>                </td>                <td>                    <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account',                        currency_obj=o.pricelist_id.currency_id) ]]                    </para>                </td>            </tr>
        </blockTable>

        <blockTable colWidths="377.0,70.0,93.0" style="Table6">            <tr>                <td>                    <para style="terp_default_9">                        <font color="white"></font>                    </para>                </td>                <td>                    <para style="terp_default_9">Total :</para>                </td>                <td>                    <para style="terp_default_Right_9">[[ formatLang(o.amount_total, dp='Account',                        currency_obj=o.pricelist_id.currency_id) ]]                    </para>                </td>            </tr>        </blockTable>

        <para style="terp_default_8">            <font color="white"></font>        </para>        <para style="terp_default_9">[[ format(o.note or '') ]]</para>        <blockTable colWidths="533.0" style="Table7">            <tr>                <td>                    <para style="terp_default_9">[[ format(o.payment_term and o.payment_term.note or                        (o.partner_id.property_payment_term and o.partner_id.property_payment_term.note or '')) ]]                    </para>                </td>            </tr>        </blockTable>        <para style="terp_default_8">            <font color="white"></font>        </para>    </story></document>
1
Avatar
Discard
Akhil P Sivan

Please format your code section properly. Otherwise difficult to check

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Error: NameError: name 'field' is not defined
openerp7
Avatar
Avatar
Avatar
2
May 22
35324
How to add "meta viewport" tag in OpenERP v7.0?
openerp7
Avatar
0
Mar 19
5065
return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
openerp7
Avatar
0
Jan 19
6297
I don't understand the basic concepts of related fields in Odoo/OpenERP 7.0 - can someone help with examples? Solved
openerp7
Avatar
Avatar
Avatar
4
Feb 24
13886
How to use ternary operator in Open-ERP7 for domain filter in XML ?
openerp7
Avatar
0
Jan 18
4790
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now