class DocumentTemplate(ModelSQL, ModelView): "Document Template" _name = 'ekd.document.template' template_move = fields.Property( fields.Many2One('ekd.account.move.template', 'Template Entry', domain=[('company', '=', Eval('company'))])) template_account = fields.Property( fields.Many2One('ekd.account', 'Template Account ', domain=[('company', '=', Eval('company'))])) template_tax_account = fields.Property( fields.Many2One('ekd.account', 'Template Tax Account ', domain=[('company', '=', Eval('company'))])) taxes = fields.Many2Many('ekd.document.template-ekd.account.tax', 'template', 'tax', 'Taxes', domain=[('parent', '=', False)]) def default_template_move(self): return Transaction().context.get('template_move') or False
class Template: __name__ = 'product.template' total_warehouse = fields.Property(fields.Numeric('Total Products Warehouse', readonly=True, digits=(16, 8))) transferidos = fields.Property(fields.Numeric('Total Transferidos', readonly=True, digits=(16, 8)))
class Configuration(ModelSingleton, ModelSQL, ModelView): 'Sale Configuration' __name__ = 'sale.configuration' sale_sequence = fields.Property( fields.Many2One('ir.sequence', 'Sale Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'sale.sale'), ], required=True)) sale_invoice_method = fields.Property( fields.Selection([('manual', 'Manual'), ('order', 'On Order Processed'), ('shipment', 'On Shipment Sent')], 'Sale Invoice Method', states={ 'required': Bool(Eval('context', {}).get('company')), })) sale_shipment_method = fields.Property( fields.Selection([ ('manual', 'Manual'), ('order', 'On Order Processed'), ('invoice', 'On Invoice Paid'), ], 'Sale Shipment Method', states={ 'required': Bool(Eval('context', {}).get('company')), }))
class Category: __name__ = 'product.category' account_depreciation = fields.Property( fields.Many2One('account.account', 'Account Depreciation', domain=[ ('kind', '=', 'other'), ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'invisible': (~Eval('context', {}).get('company') | Eval('account_parent')), })) account_depreciation_used = MissingFunction( fields.Many2One('account.account', 'Account Depreciation Used'), 'missing_account', 'get_account') account_asset = fields.Property( fields.Many2One('account.account', 'Account Asset', domain=[ ('kind', '=', 'expense'), ('company', '=', Eval('context', {}).get('company', -1)), ], states={ 'invisible': (~Eval('context', {}).get('company') | Eval('account_parent')), })) account_asset_used = MissingFunction( fields.Many2One('account.account', 'Account Asset Used'), 'missing_account', 'get_account')
class Property(ModelSQL): 'Property' __name__ = 'test.property' char = fields.Property(fields.Char('Test Char')) many2one = fields.Property(fields.Many2One('test.char', 'Test Many2One')) numeric = fields.Property(fields.Numeric('Test Numeric')) selection = fields.Property( fields.Selection([(None, ''), ('option_a', 'Option A'), ('option_b', 'Option B')], 'Test Selection'))
class Configuration: "Sale Opportunity configuration" __name__ = 'sale.configuration' website_employee = fields.Property( fields.Many2One('company.employee', 'Website Employee')) sale_opportunity_email = fields.Property( fields.Char('Sale Opportunity Email'))
class GnuHealthSequences(ModelSingleton, ModelSQL, ModelView): "Standard Sequences for GNU Health" __name__ = "gnuhealth.sequences" lab_sequence = fields.Property(fields.Many2One('ir.sequence', 'Lab Sequence', domain=[('code', '=', 'gnuhealth.lab')], required=True)) lab_request_sequence = fields.Property(fields.Many2One('ir.sequence', 'Patient Lab Request Sequence', required=True, domain=[('code', '=', 'gnuhealth.patient.lab.test')]))
class Party: __name__ = 'party.party' supplier_location = fields.Property(fields.Many2One('stock.location', 'Supplier Location', domain=[('type', '=', 'supplier')], help='The default source location when receiving products from the ' 'party.')) customer_location = fields.Property(fields.Many2One('stock.location', 'Customer Location', domain=[('type', '=', 'customer')], help='The default destination location when sending products to the ' 'party.'))
class Configuration(ModelSingleton, ModelSQL, ModelView): 'Configuration' __name__ = 'collecting_society.configuration' artist_sequence = fields.Property( fields.Many2One('ir.sequence', 'Artist Sequence', domain=[ ('code', '=', 'artist'), ])) release_sequence = fields.Property( fields.Many2One('ir.sequence', 'Release Sequence', domain=[ ('code', '=', 'release'), ])) creation_sequence = fields.Property( fields.Many2One('ir.sequence', 'Creation Sequence', domain=[ ('code', '=', 'creation'), ])) content_sequence = fields.Property( fields.Many2One('ir.sequence', 'Content Sequence', domain=[ ('code', '=', 'content'), ])) tariff_system_sequence = fields.Property( fields.Many2One('ir.sequence', 'Tariff System Sequence', domain=[ ('code', '=', 'tariff_system'), ])) harddisk_label_sequence = fields.Property( fields.Many2One('ir.sequence', 'Harddisk Label Sequence', domain=[ ('code', '=', 'harddisk.label'), ])) filesystem_label_sequence = fields.Property( fields.Many2One('ir.sequence', 'Filesystem Label Sequence', domain=[ ('code', '=', 'harddisk.filesystem.label'), ])) utilisation_sequence = fields.Property( fields.Many2One('ir.sequence', 'Utilisation Sequence', domain=[ ('code', '=', 'creation.utilisation'), ])) distribution_sequence = fields.Property( fields.Many2One('ir.sequence', 'Distribution Sequence', domain=[ ('code', '=', 'distribution'), ]))
class Configuration: __name__ = 'account.configuration' stock_journal = fields.Property(fields.Many2One( 'account.journal', 'Stock Journal', states={ 'required': Bool(Eval('context', {}).get('company')), })) cost_price_counterpart_account = fields.Property(fields.Many2One( 'account.account', 'Cost Price Counterpart Account', domain=[ ('company', 'in', [Get(Eval('context', {}), 'company'), None]), ]))
class Configuration(ModelSingleton, ModelSQL, ModelView): 'Party Configuration' __name__ = 'party.configuration' party_sequence = fields.Property(fields.Many2One('ir.sequence', 'Party Sequence', domain=[ ('code', '=', 'party.party'), ])) party_lang = fields.Property(fields.Many2One("ir.lang", 'Party Language', help=('The value set on this field will preset the language on new ' 'parties')))
class GnuHealthSequences(ModelSingleton, ModelSQL, ModelView): "Standard Sequences for GNU Health" __name__ = "gnuhealth.sequences" ambulatory_care_sequence = fields.Property( fields.Many2One('ir.sequence', 'Health Ambulatory Care', domain=[('code', '=', 'gnuhealth.ambulatory_care')])) patient_rounding_sequence = fields.Property( fields.Many2One('ir.sequence', 'Health Rounding', domain=[('code', '=', 'gnuhealth.patient.rounding')]))
class Configuration(ModelSingleton, ModelSQL, ModelView): 'Stock Configuration' __name__ = 'stock.configuration' shipment_in_sequence = fields.Property( fields.Many2One('ir.sequence', 'Supplier Shipment Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.in'), ], required=True)) shipment_in_return_sequence = fields.Property( fields.Many2One('ir.sequence', 'Supplier Return Shipment Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.in.return'), ], required=True)) shipment_out_sequence = fields.Property( fields.Many2One('ir.sequence', 'Customer Shipment Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.out'), ], required=True)) shipment_out_return_sequence = fields.Property( fields.Many2One('ir.sequence', 'Customer Return Shipment Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.out.return'), ], required=True)) shipment_internal_sequence = fields.Property( fields.Many2One('ir.sequence', 'Internal Shipment Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'stock.shipment.internal'), ], required=True))
class SaleConfig: __name__ = 'sale.configuration' sale_drop_location = fields.Property( fields.Many2One('stock.location', 'Sale Drop Location', domain=[('type', '=', 'drop')]))
class Document(ModelSQL, ModelView): "Document" _name = 'ekd.document' move = fields.Many2One('ekd.account.move', 'Account Entry Lines', states=_STATES, depends=_DEPENDS) account_document = fields.Property( fields.Many2One('ekd.account', 'Account Document', domain=[('company', '=', Eval('company'))])) def post_accounting(self, model=None, ids=None, template_move=None, add_options={}): if model == None or ids == None: return model_obj = self.pool.get(model) template_move_obj = self.pool.get('ekd.account.move.template') for line in model_obj.browse(ids): template_move_obj.create_move({ 'document': [model, line.id, line], 'template': line.template.template_move, 'return': 'id', 'add_options': add_options })
class DocumentTemplateStage(ModelSQL, ModelView): "Document Template Stage" _name = 'ekd.document.template.stage' template_move = fields.Property( fields.Many2One('ekd.account.move.template', 'Template Entry', domain=[('company', '=', Eval('company'))])) template_account = fields.Property( fields.Many2One('ekd.account', 'Template Account ', domain=[('company', '=', Eval('company'))])) template_tax_account = fields.Property( fields.Many2One('ekd.account', 'Template Tax Account ', domain=[('company', '=', Eval('company'))]))
class PayrollAccount(ModelSQL, ModelView): 'Payroll Account' __name__ = 'quickbooks.payroll_account' _rec_name = 'payroll_item' account = fields.Property( fields.Many2One('account.account', 'Account', required=True)) payroll_item = fields.Char('Payroll Item') @classmethod def __setup__(cls): super(PayrollAccount, cls).__setup__() cls._error_messages.update( {'party_required': 'Party must be required on account'}) cls._sql_constraints = [('payroll_item_uniq', 'UNIQUE(payroll_item)', 'Payroll Item must be unique per project')] @classmethod def validate(cls, payroll_accounts): super(PayrollAccount, cls).validate(payroll_accounts) for account in payroll_accounts: account.check_account() def check_account(self): if not self.account.party_required: self.raise_user_error("party_required")
class PurchaseConfiguration: __metaclass__ = PoolMeta __name__ = 'purchase.configuration' supply_period = fields.Property( fields.Integer('Supply Period', help='In number of days', required=True))
class SaleConfiguration: 'Sale Configuration' __name__ = 'sale.configuration' round_down_account = fields.Property( fields.Many2One('account.account', 'Round Down Account', required=True))
class Configuration(ModelSingleton, ModelSQL, ModelView): 'Purchase Configuration' __name__ = 'purchase.configuration' purchase_sequence = fields.Property(fields.Many2One('ir.sequence', 'Purchase Reference Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', -1), None]), ('code', '=', 'purchase.purchase'), ], required=True)) purchase_invoice_method = fields.Property(fields.Selection([ ('manual', 'Manual'), ('order', 'Based On Order'), ('shipment', 'Based On Shipment'), ], 'Invoice Method', states={ 'required': Bool(Eval('context', {}).get('company')), }))
class Party: __name__ = 'party.party' sale_invoice_grouping_method = fields.Property( fields.Selection([ (None, 'None'), ('standard', 'Standard'), ], 'Sale Invoice Grouping Method'))
class GnuHealthSequences(ModelSingleton, ModelSQL, ModelView): "Standard Sequences for GNU Health" __name__ = "gnuhealth.sequences" ambulatory_care_sequence = fields.Property(fields.Many2One('ir.sequence', 'Health Ambulatory Care', domain=[ ('code', '=', 'gnuhealth.ambulatory_care') ], required=True))
class Party: __name__ = 'party.party' sale_shipment_grouping_method = fields.Property( fields.Selection([ (None, 'None'), ('standard', 'Standard'), ], 'Sale Shipment Grouping Method'))
class GnuHealthSequences(ModelSingleton, ModelSQL, ModelView): __name__ = 'gnuhealth.sequences' dengue_du_survey_sequence = fields.Property( fields.Many2One('ir.sequence', 'Dengue Survey Sequence', required=True, domain=[('code', '=', 'gnuhealth.dengue_du_survey')]))
class GnuHealthSequences(ModelSingleton, ModelSQL, ModelView): "Standard Sequences for GNU Health" __name__ = "gnuhealth.sequences" imaging_request_sequence = fields.Property( fields.Many2One('ir.sequence', 'Imaging Request Sequence', domain=[('code', '=', 'gnuhealth.imaging.test.request') ], required=True)) imaging_sequence = fields.Property( fields.Many2One('ir.sequence', 'Imaging Sequence', domain=[('code', '=', 'gnuhealth.imaging.test.result') ], required=True))
class Configuration: __metaclass__ = PoolMeta __name__ = 'stock.configuration' package_sequence = fields.Property(fields.Many2One('ir.sequence', 'Package Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company'), None]), ('code', '=', 'stock.package'), ], required=True))
class Configuration: __metaclass__ = PoolMeta __name__ = 'stock.configuration' shelf_life_delay = fields.Property( fields.Integer('Shelf Life Delay', help='The delay in number of days before ' 'removal from the forecast'))
class PolicoopSequences(ModelSingleton, ModelSQL, ModelView): "Standard Sequences for Policoop" __name__ = "policoop.sequences" transport_request_code_sequence = fields.Property(fields.Many2One('ir.sequence', 'Transport Request Sequence', domain=[('code', '=', 'policoop.transport_request')], required=True))
class Configuration: __name__ = 'production.configuration' supply_period = fields.Property(fields.Numeric('Supply Period', digits=(16, 0), help='In number of days', required=True)) @staticmethod def default_supply_period(): return Decimal(0)
class Configuration: __name__ = 'account.configuration' sepa_mandate_sequence = fields.Property(fields.Many2One('ir.sequence', 'SEPA Mandate Sequence', domain=[ ('code', '=', 'account.payment.sepa.mandate'), ('company', 'in', [Eval('context', {}).get('company', -1), None]), ]))