Produkt Details

Zurück zum Shop

MuK Documents Field MuK Documents Field

MuK Documents Field

0 Bewertung(en) | Bewerten Sie dieses Produkt

0,00 € 0.0 EUR

0,00 €

Document Fields - Versions [11]

In den Warenkorb

MuK Documents Field

Add Documents Fields to any Model

MuK IT GmbH - www.mukit.at

Overview

Adds support for document fields to MuK IT. The fields can be used like any other MuK IT fields. The field arguments filename and directory can be a function or a value. The filename parameter has to be a string and the directory an integer representing the id of the directory.

		    	
from MuK IT.addons.muk_dms_field.fields.dms_binary import DocumentBinary
from MuK IT.addons.muk_dms_field.fields.dms_many2one import DocumentMany2one

class Model(models.Model):
    
    def _get_file_name(self):
        return self.content_fname or "NewFile"
    
    def _get_file_directory(self):
        return self.env.ref("muk_dms.directory_01_demo").id
    
    content_fname = fields.Char(
        string="Filename")
    
    content = DocumentBinary(
        string="Data",
        filename=_get_file_name,
        directory=_get_file_directory)
    
    file = DocumentMany2one(
        comodel_name='muk_dms.file')
		    	
			

Demo

User:
apps
Password:
demo

Help and Support

Feel free to contact us, if you need any help with your MuK IT integration or addiontal features.