Odoo Help

2

2
3 Answers
1
Clément THOMAS Belgium
8/21/14, 4:15 AM

An example with contract_file and contract_file_name (file name depends on code of contracts throw a function for this example).

in python class :

_columns = {

'contract_file':fields.binary("Contract file (PDF)"),

'contract_file_name': fields.function(_get_contract_file_name, type="char", size=255, readonly=True, method=True),

}

contract_file_name can be a simple char field

 

in xml : 

<field name="contract_file" filename="contract_file_name"/> 
<field name="contract_file_name" invisible="1"/>

don't set invisible="1" if you want a field to set explicitly the file name

1
Avatar

Nehal India

--Nehal--

2131
| 6 2 10
Ahmadabad, India
--Nehal--
Nehal India
5/15/14, 11:46 PM

Hi,

Refer the following link for filename. It may help you. 
https://bugs.launchpad.net/openerp-web/+bug/1252458

0
Francisco Castro Portugal
5/16/14, 12:29 PM

it raises an error your solution

Ask a Question
Keep Informed
1 follower(s)
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