Odoo Help


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.


Default payment terms

Tor Asbjørn
on 5/7/13, 10:36 AM 5,181 views

Where can I set the default payment term to use, insted of blank?


Jignesh Mehta

--Jignesh Mehta--
| 6 4 8
Surat, India
--Jignesh Mehta--

Jignesh Mehta
On 10/23/15, 5:30 AM

Hello Tor,

If you want same payment term in all the customers by default, you have to add following code in your python file.

class res_partner(osv.Model):

     _inherit = "res.partner"

     _defaults = {

        'property_payment_term' : '15 Days'


Its for 15 Days, you can set another one as of your choice.


Good point, but coding in this case is not needed, thanks to the flexibility of Odoo. Dealing with default parameters from the interface (or XML records) is more maintainable than dealing with code that overrides base models (plus, you are using old API).

on 10/23/15, 5:33 AM

Yes, i agree with you. but in this you have to do the same for all databases manually so isn't code is more flexible than this.

Jignesh Mehta
on 10/23/15, 5:43 AM

Priyesh Solanki (pso)

--Priyesh Solanki (pso)--
Tiny ERP Pvt Ltd
| 2 2 4
--Priyesh Solanki (pso)--
Priyesh Solanki (pso)
On 5/7/13, 11:05 AM

I am assuming that you want to set default payment term in Partner form. In Partner, You will find Customer Payment Term and Supplier Payment Term.

If it is, Go to Settings --> Technical --> Parameters --> Configuration Parameters. For Customer Payment Term, create a new record with this name 'property_payment_term' and set related field, company, object and value, you want to show as default in that field. For Supplier Payment Term, create a new record with this name 'property_supplier_payment_term' and set related field, company, object and value, you want to show as default in that field.

Make sure You are not selecting any resource (Partner/Product) otherwise it will be come for that particular resource value.

Thanks, Priyesh Solanki

How its work??

Ashish Singh
on 11/15/14, 12:47 AM
On 10/23/15, 5:26 AM

Late reply, but the question is still valid.

In Odoo 8, for setting the default customer payment term to the "30 Days Net" value, for every company, for any customer:

From web client: Settings > Technical > Parameters > Company Properties

Create new

Name: property_payment_term
Field: (choose) Customer Payment Term
Resource: [leave empty]
Value: account.payment.term,3
Company: [leave empty]

Via data file:

<record id="payment_term_default_30" model="ir.property">
<field name="name">property_payment_term</field>
<field name="fields_id" search="[('model','=','res.partner'),('name','=','property_payment_term')]" />
<field name="value">account.payment.term,3</field>

As previously pointed out by Priyesh Solanki (pso), leaving blank the resource and the company makes the value in "Value" field as default for any instance ("document" in Odoo lexicon) of the model that the field ("Customer Payment Term", in this case) is referred to (res.partner, in this case). 

Alberto Lozano
On 11/23/15, 12:21 PM

Default sales order payment term Odoo 9.0

This will set a default payment term for any customer that does not have a default payment term on they properties:

1. Edit sale.py SaleOrder class at def onchange_partner_id(self) section, where you find the following line:

'payment_term_id': self.partner_id.property_payment_term_id and self.partner_id.property_payment_term_id.id or False

and replace False for 1 so it will look like:

'payment_term_id': self.partner_id.property_payment_term_id and self.partner_id.property_payment_term_id.id or 1

This will make default the first option defined as payment term in Accounting - Configuration - Management - Payment terms if there is no default payment term assigned for that customer. You can also replace False for 'whatever you want as payment term'

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)


Asked: 5/7/13, 10:36 AM
Seen: 5181 times
Last updated: 11/23/15, 1:42 PM