Odoo Help

1

DB table relating Partner and its Payment term

By
Bhavik
on 8/31/13, 7:21 AM 3,014 views

Would like to know which table shows relation between partner and its payment term.

3

Ray Carnes

--Ray Carnes--
16611
| 9 7 9
Atlanta, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0.

Completed Odoo Functional and Technical Training.

Major Skills:

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 8/31/13, 3:07 PM

Using Developer Mode you can hover over any field to see the business object (model) details:

image description

This tells you the Customer Payment Term field is called property_payment_term and that it is a many2one field that relates the res.partner model (the model that holds the basic Customer information) with the account.payment.term model.

Property fields like this are stored in the ir_property model.

More about these kinds of fields at https://doc.openerp.com/trunk/server/03_module_dev_02/#property-fields

Arrrrrrr! 1hour later .... "Property fields like this are stored in the ir_property model." ...cheers

Cameron
on 1/4/17, 9:38 AM
1
cd
On 8/31/13, 10:04 AM

ACCOUNT_PAYMENT_TERM

id (ex 1)
name (ex 'Immediate payment')

RES_PARTNER

id = the ide of the partner

IR_PROPERTY

name="property payment term"
value_reference="account.payment.term," + the id of the account_payment__term (ex 1)
res_id = "res_partner," + the id the partner

1

Use this SQL


SELECT RP.NAME PARTNER, PT.NAME PAYMENT_TERM FROM IR_PROPERTY IP, RES_PARTNER RP, ACCOUNT_PAYMENT_TERM PT WHERE IP.NAME LIKE '%payment_term' AND CONCAT('res.partner,',RP.ID) = IP.RES_ID AND CONCAT('account.payment.term,',PT.ID) = IP.VALUE_REFERENCE
-1

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/31/13, 7:21 AM
Seen: 3014 times
Last updated: 1/4/17, 9:40 AM