Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to change a Billing method in sales module ?

By
Debashis Das
on 5/22/13, 7:12 AM 1,451 views

As per sale.order we can make an invoice through Advance mode & Crete Final Invoice mode on the basis of Sales Order value. But as a Rental of vehicle CO. (Service Industry), we have requirement of partial Invoice. As I have requirement as follows :

1) No need of Advance Invoice

2) No need of Final Invoice

3) Requirement of Part invoices

Ex. I have received a 12 months contract from a client for USD 1000 per month basis i.e. sale order value will be USD 12000. Now I have to raise bill on month end for USD 1000 in each month until 12 months covered.

For this reason, I have made some changes in sale.order.form (as follows) and workflow (link : docs.google.com/file/d/0B6ly-HpPtrX3a2d0MUpDQ1Z2V3M/edit?hl=en-GB&forcehl=1&pli=1) also.

<form string="Sales Order"> <group col="6" colspan="4"> <group col="4" colspan="4"> <field name="name"/> <field name="date_order"/> <field name="shop_id" readonly="1" string="Organisation"/> <field name="client_order_ref"/> </group> <group col="2" colspan="2"> <field name="invoiced"/> <field name="invoiced_rate" string="Achievement" widget="progressbar"/> </group> </group> <notebook colspan="5"> <page string="Sales Order"> <field name="partner_id" options="{"quick_create": false}" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1"/> <field domain="[('partner_id','=',partner_id)]" name="partner_order_id" on_change="onchange_partner_order_id(partner_order_id, partner_invoice_id, partner_shipping_id)" options="{"quick_create": false}"/> <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended" options="{"quick_create": false}"/> <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended" options="{"quick_create": false}"/> <field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended" on_change="onchange_pricelist_id(pricelist_id,order_line)"/> <field name="project_id" context="{'partner_id':partner_id, 'contact_id':partner_order_id, 'pricelist_id':pricelist_id, 'default_name':name}" groups="analytic.group_analytic_accounting" domain="[('type','<>','view'), ('company_id', '=', company_id), ('parent_id', '!=', False)]"/> <newline/> <field colspan="4" name="order_line" nolabel="1" widget="one2many_list"> <form string="Sales Order Lines"> <notebook> <page string="Order Line"> <group colspan="4" col="5"> <field colspan="3" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom, 'force_product_uom': True}" name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)"/> <field name="name"/> <field context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}" name="product_uom_qty" on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, context)"/> <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)" nolabel="1"/> <field name="price_unit"/> <field groups="product.group_uos" name="product_uos_qty"/> <field groups="product.group_uos" name="product_uos" nolabel="1"/> <newline/> <field name="product_packaging" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}" on_change="product_packaging_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, parent.partner_id, product_packaging, True, context)" domain="[('product_id','=',product_id)]" groups="base.group_extended" colspan="3"/> <field name="discount"/> <separator colspan="5" string="Notes"/> <field colspan="5" name="notes" nolabel="1"/> <separator colspan="5" string="Taxes"/> <field colspan="5" name="tax_id" nolabel="1" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/> <group colspan="5" col="5" groups="base.group_extended"> <separator colspan="5" string="States"/> <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors="{"exception":"red","cancel":"red"}"/> <field name="invoiced"/> <group attrs="{'invisible':[('invoiced','=',True)]}"> <button colspan="1" name="472" states="confirmed" string="Make Invoices" type="action" icon="terp-document-new"/> </group> </group> </group> </page> <page groups="base.group_extended" string="Extra Info"> <field name="type"/> <field name="delay"/> <field name="th_weight"/> <field name="address_allotment_id"/> <separator colspan="4" string="Properties"/> <field name="property_ids" colspan="4" nolabel="1"/> </page> <page string="History" groups="base.group_extended"> <separator colspan="4" string="Invoice Lines"/> <field colspan="4" name="invoice_lines" nolabel="1"/> <separator colspan="4" string="Stock Moves"/> <field colspan="4" name="move_ids" nolabel="1" widget="many2many"/> </page> </notebook> </form>

                            <tree string="Sales Order Lines">
                                <field colspan="4" name="name"/>
                                <field name="product_uom_qty" string="Qty(UoM)"/>
                                <field name="product_uom" string="UoM"/>
                                <field groups="product.group_uos" name="product_uos_qty" string="Qty(UoS)"/>
                                <field groups="product.group_uos" name="product_uos" string="UoS"/>
                                <field name="discount"/>
                                <field name="price_unit"/>
                                <field name="price_subtotal"/>
                            </tree>
                        </field>
                        <newline/>
                        <group col="13" colspan="10">
                            <field name="amount_untaxed" sum="Untaxed amount"/>
                            <field name="amount_tax"/>
                            <field name="amount_total"/>
                            <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
                                                        </group>
                        <group col="17" colspan="4">
                            <field name="state" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors="{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}"/>
                            <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/>
                            <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/>
                                                           <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/>
                            <button name="474" string="Print Order" type="action" icon="gtk-print" states="waiting_date,manual,progress,done,shipping_except,invoice_except"/>
                            <button name="manual_invoice" states="manual" string="Create Invoice" icon="gtk-go-forward" type="object"/>
                            <button name="button_done" states="progress,manual" string="Done" icon="gtk-go-forward"/>
                                                         <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
                            <button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>
                            <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/>
                            <button name="474" string="Print Quotation" type="action" icon="gtk-print" states="draft"/>
                            <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/>
                        </group>
                    </page>
                    <page string="Other Information">

                        <group colspan="2" col="2">
                            <separator string="References" colspan="2"/>
                            <field name="user_id"/>
                            <field groups="base.group_extended" name="origin"/>
                        </group>
                        <group colspan="2" col="2" groups="base.group_extended">
                            <separator string="Conditions" colspan="2"/>
                            <field name="payment_term" widget="selection"/>
                            <field name="fiscal_position" widget="selection"/>
                            <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                        </group>
                        <group colspan="2" col="2" groups="base.group_extended">
                            <separator string="Dates" colspan="2"/>
                            <field name="create_date"/>
                            <field name="date_confirm"/>
                        </group>
                        <separator colspan="4" string="Notes"/>
                        <field colspan="4" name="note" nolabel="1"/>
                    </page>
                    <page string="History" groups="base.group_extended">
                        <separator colspan="4" string="Invoices"/>
                        <field colspan="4" name="invoice_ids" nolabel="1" context="{'form_view_ref':'account.invoice_form'}"/>
                                                </page>
                </notebook>
            </form>

I want to make it as follows :

1) Deletion of Advance Invoice button

2) "manual_invoice" will be recurring type..(in the OpenERP it is for final bill which have to change). i.e. after creation of 1st invoice through "manual_invoice" when it goes from "to invoice" mode to "progress" mode...we can again transfer the same to "to invoice" mode for another creation of bill as earlier. If require, we can make a button like "another invoice" which will transfer the "progress" mode to "to invoice" mode...so that we can issue another bill through "manual_invoice" as 1st invoice.

3) We can change the bill value in the invoice line as require...which is not a problem

4) "Done" state shown after receiving of all the payments or otherwise there should be a Done button after completion of all activity will close the Order and stated "Done"

Please advice.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/22/13, 7:12 AM
Seen: 1451 times
Last updated: 3/16/15, 8:10 AM