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 create a invoice for a customer and not a supplier?

By
Pascal Tremblay
on 1/21/15, 9:28 AM 969 views

Hello gang!

I have added a new menuitems : Sales->Sales->Sales invoices - PT 

If I click on my new menuitem, I get list view of all the invoices. Good!

If I click on the button « create », it creates a new draft SUPPLIER invoice. Not for a CUSTOMER :

 

Would you know how I could correct this? A tip?

Please and thanks!

1

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 1/21/15, 9:39 AM

See the original view definition, bold for you:      

<record id="action_invoice_tree1" model="ir.actions.act_window">
            <field name="name">Customer Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph</field>
            <field eval="False" name="view_id"/>
            <field name="domain">[('type','=','out_invoice')]</field>
            <field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>

            <field name="search_view_id" ref="view_account_invoice_filter"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to create a customer invoice.
              </p><p>
                Odoo's electronic invoicing allows to ease and fasten the
                collection of customer payments. Your customer receives the
                invoice by email and he can pay online and/or import it
                in his own system.
              </p><p>
                The discussions with your customer are automatically displayed at
                the bottom of each invoice.
              </p>
            </field>
        </record>

 

0

Pascal Tremblay

--Pascal Tremblay--
1314
| 5 2 7
Alma, Canada
--Pascal Tremblay--


Pascal Tremblay
On 1/21/15, 3:35 PM

zbik was right. Once again! Thanks.

Here is all the needed code to create my new  « Sales->Sales->Sales invoices - PT » menuitems :

<menuitem id="report_lapagept.menu_action_invoice_tree1_pt" name="Sales invoices - PT" parent="base.menu_sales" sequence="300" action="report_lapagept.action_invoice_tree1_pt" />

        <record id="report_lapagept.action_invoice_tree1_pt" model="ir.actions.act_window">
            <field name="name">Sale invoices - PT action</field>
            <field name="res_model">account.invoice</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph</field>
            <field eval="False" name="view_id"/>
            <field name="domain">[('type','=','out_invoice')]</field>
            <field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to create a customer invoice.
              </p><p>
                Odoo's electronic invoicing allows to ease and fasten the
                collection of customer payments. Your customer receives the
                invoice by email and he can pay online and/or import it
                in his own system.
              </p><p>
                The discussions with your customer are automatically displayed at
                the bottom of each invoice.
              </p>
            </field>
        </record>

<record id="report_lapagept.action_invoice_tree1_view1" model="ir.actions.act_window.view">
            <field eval="1" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="act_window_id" ref="report_lapagept.action_invoice_tree1_pt"/>
        </record>

        <record id="report_lapagept.action_invoice_tree1_view2" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="invoice_form"/>
            <field name="act_window_id" ref="report_lapagept.action_invoice_tree1_pt"/>
        </record>

THANKS ALL!

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

1 follower(s)

Stats

Asked: 1/21/15, 9:28 AM
Seen: 969 times
Last updated: 3/16/15, 8:10 AM