[IMP] all: Add description on all models

Purpose
========

There are more than 250 models that have a technical name as model description

The purpose of this task is to give them a more "business oriented"
business description. Indeed, those descriptions appear in Odoo
Studio which is supposed to be used by end users, not only by
developers.

Example :
account.invoice > Invoice
website.version > Website Version
This commit is contained in:
Yannick Tivisse
2018-09-21 11:45:39 +02:00
233 changed files with 426 additions and 119 deletions
+2
View File
@@ -353,6 +353,7 @@ class AccountAccount(models.Model):
class AccountGroup(models.Model):
_name = "account.group"
_description = 'Account Group'
_parent_store = True
_order = 'code_prefix'
@@ -857,6 +858,7 @@ class ResPartnerBank(models.Model):
class AccountTaxGroup(models.Model):
_name = 'account.tax.group'
_description = 'Tax Group'
_order = 'sequence asc'
name = fields.Char(required=True, translate=True)
@@ -34,7 +34,7 @@ class AccountBankStmtCashWizard(models.Model):
Account Bank Statement popup that allows entering cash details.
"""
_name = 'account.bank.statement.cashbox'
_description = 'Account Bank Statement Cashbox Details'
_description = 'Bank Statement Cashbox'
cashbox_lines_ids = fields.One2many('account.cashbox.line', 'cashbox_id', string='Cashbox Lines')
@@ -59,7 +59,7 @@ class AccountBankStmtCloseCheck(models.TransientModel):
Account Bank Statement wizard that check that closing balance is correct.
"""
_name = 'account.bank.statement.closebalance'
_description = 'Account Bank Statement closing balance'
_description = 'Bank Statement Closing Balance'
@api.multi
def validate(self):
@@ -12,7 +12,7 @@ class AccountCashRounding(models.Model):
see https://en.wikipedia.org/wiki/Cash_rounding for more details.
"""
_name = 'account.cash.rounding'
_description = 'Account Rounding'
_description = 'Account Cash Rounding'
name = fields.Char(string='Name', translate=True, required=True)
rounding = fields.Float(string='Rounding Precision', required=True,
+1 -1
View File
@@ -18,7 +18,7 @@ from lxml import etree
class AccountMove(models.Model):
_name = "account.move"
_description = "Account Entry"
_description = "Journal Entries"
_order = 'date desc, id desc'
@api.multi
+1 -1
View File
@@ -248,7 +248,7 @@ class account_abstract_payment(models.AbstractModel):
class account_register_payments(models.TransientModel):
_name = "account.register.payments"
_inherit = 'account.abstract.payment'
_description = "Register payments on multiple invoices"
_description = "Register Payments"
group_invoices = fields.Boolean(string="Group Invoices", help="""If enabled, groups invoices by commercial partner, invoice account,
type and recipient bank account in the generated payments. If disabled,
+4 -3
View File
@@ -92,7 +92,7 @@ class AccountAccountTemplate(models.Model):
class AccountChartTemplate(models.Model):
_name = "account.chart.template"
_description = "Templates for Account Chart"
_description = "Account Chart Template"
name = fields.Char(required=True)
parent_id = fields.Many2one('account.chart.template', string='Parent Chart Template')
@@ -901,7 +901,7 @@ class AccountFiscalPositionTemplate(models.Model):
class AccountFiscalPositionTaxTemplate(models.Model):
_name = 'account.fiscal.position.tax.template'
_description = 'Template Tax Fiscal Position'
_description = 'Tax Mapping Template of Fiscal Position'
_rec_name = 'position_id'
position_id = fields.Many2one('account.fiscal.position.template', string='Fiscal Position', required=True, ondelete='cascade')
@@ -911,7 +911,7 @@ class AccountFiscalPositionTaxTemplate(models.Model):
class AccountFiscalPositionAccountTemplate(models.Model):
_name = 'account.fiscal.position.account.template'
_description = 'Template Account Fiscal Mapping'
_description = 'Accounts Mapping Template of Fiscal Position'
_rec_name = 'position_id'
position_id = fields.Many2one('account.fiscal.position.template', string='Fiscal Mapping', required=True, ondelete='cascade')
@@ -921,6 +921,7 @@ class AccountFiscalPositionAccountTemplate(models.Model):
class AccountReconcileModelTemplate(models.Model):
_name = "account.reconcile.model.template"
_description = 'Reconcile Model Template'
# Base fields.
chart_template_id = fields.Many2one('account.chart.template', string='Chart Template', required=True)
+2 -2
View File
@@ -164,7 +164,7 @@ class AccountFiscalPosition(models.Model):
class AccountFiscalPositionTax(models.Model):
_name = 'account.fiscal.position.tax'
_description = 'Taxes Fiscal Position'
_description = 'Tax Mapping of Fiscal Position'
_rec_name = 'position_id'
position_id = fields.Many2one('account.fiscal.position', string='Fiscal Position',
@@ -181,7 +181,7 @@ class AccountFiscalPositionTax(models.Model):
class AccountFiscalPositionAccount(models.Model):
_name = 'account.fiscal.position.account'
_description = 'Accounts Fiscal Position'
_description = 'Accounts Mapping of Fiscal Position'
_rec_name = 'position_id'
position_id = fields.Many2one('account.fiscal.position', string='Fiscal Position',
@@ -9,6 +9,7 @@ from odoo.tools.misc import formatLang
class AccountReconciliation(models.AbstractModel):
_name = 'account.reconciliation.widget'
_description = 'Account Reconciliation widget'
####################################################
# Public
@@ -11,6 +11,7 @@ from dateutil.relativedelta import relativedelta
class ReportAgedPartnerBalance(models.AbstractModel):
_name = 'report.account.report_agedpartnerbalance'
_description = 'Aged Partner Balance Report'
def _get_partner_move_lines(self, account_type, date_from, target_move, period_length):
# This method can receive the context key 'include_nullified_amount' {Boolean}
+1
View File
@@ -7,6 +7,7 @@ from odoo.exceptions import UserError
class ReportTrialBalance(models.AbstractModel):
_name = 'report.account.report_trialbalance'
_description = 'Trial Balance Report'
def _get_accounts(self, accounts, display_account):
""" compute the balance, debit and credit for the provided accounts
@@ -7,6 +7,7 @@ from odoo.exceptions import UserError
class ReportGeneralLedger(models.AbstractModel):
_name = 'report.account.report_generalledger'
_description = 'General Ledger Report'
def _get_account_move_entry(self, accounts, init_balance, sortby, display_account):
"""
@@ -185,6 +185,7 @@ class AccountInvoiceReport(models.Model):
class ReportInvoiceWithPayment(models.AbstractModel):
_name = 'report.account.report_invoice_with_payments'
_description = 'Account report with payment lines'
@api.model
def _get_report_values(self, docids, data=None):
+1
View File
@@ -7,6 +7,7 @@ from odoo.exceptions import UserError
class ReportJournal(models.AbstractModel):
_name = 'report.account.report_journal'
_description = 'Account Journal Report'
def lines(self, target_move, journal_ids, sort_selection, data):
if isinstance(journal_ids, int):
@@ -6,6 +6,7 @@ from odoo import api, fields, models
class ReportOverdue(models.AbstractModel):
_name = 'report.account.report_overdue'
_description = 'Account Overdue Report'
def _get_account_move_lines(self, partner_ids):
res = {x: [] for x in partner_ids}
@@ -8,6 +8,7 @@ from odoo.exceptions import UserError
class ReportPartnerLedger(models.AbstractModel):
_name = 'report.account.report_partnerledger'
_description = 'Partner Ledger Report'
def _lines(self, data, partner):
full_account = []
@@ -7,6 +7,7 @@ from odoo.exceptions import UserError
class ReportFinancial(models.AbstractModel):
_name = 'report.account.report_financial'
_description = 'Financial Report'
def _compute_account_balance(self, accounts):
""" compute the balance, debit and credit for the provided accounts
+1
View File
@@ -6,6 +6,7 @@ from odoo.exceptions import UserError
class ReportTax(models.AbstractModel):
_name = 'report.account.report_tax'
_description = 'Tax Report'
@api.model
def _get_report_values(self, docids, data=None):
@@ -8,6 +8,7 @@ from odoo.exceptions import UserError
class AccountInvoiceSend(models.TransientModel):
_name = 'account.invoice.send'
_inherits = {'mail.compose.message':'composer_id'}
_description = 'Account Invoice Send'
is_email = fields.Boolean('Email', default=lambda self: self.env.user.company_id.invoice_is_email)
is_print = fields.Boolean('Print', default=lambda self: self.env.user.company_id.invoice_is_print)
@@ -6,7 +6,7 @@ class AccountMoveReversal(models.TransientModel):
Account move reversal wizard, it cancel an account move by reversing it.
"""
_name = 'account.move.reversal'
_description = 'Account move reversal'
_description = 'Account Move Reversal'
date = fields.Date(string='Reversal date', default=fields.Date.context_today, required=True)
journal_id = fields.Many2one('account.journal', string='Use Specific Journal', help='If empty, uses the journal of the journal entry to be reversed.')
@@ -11,7 +11,7 @@ class AccountAgedTrialBalance(models.TransientModel):
_name = 'account.aged.trial.balance'
_inherit = 'account.common.partner.report'
_description = 'Account Aged Trial balance Report'
_description = 'Aged Trial Balance Report'
period_length = fields.Integer(string='Period Length (days)', required=True, default=30)
journal_ids = fields.Many2many('account.journal', string='Journals', required=True)
@@ -5,9 +5,9 @@ from odoo import api, fields, models
class AccountCommonAccountReport(models.TransientModel):
_name = 'account.common.account.report'
_description = 'Account Common Account Report'
_description = 'Common Account Report'
_inherit = "account.common.report"
display_account = fields.Selection([('all','All'), ('movement','With movements'),
('not_zero','With balance is not equal to 0'),],
string='Display Accounts', required=True, default='movement')
@@ -5,7 +5,7 @@ from odoo import api, fields, models
class AccountCommonJournalReport(models.TransientModel):
_name = 'account.common.journal.report'
_description = 'Account Common Journal Report'
_description = 'Common Journal Report'
_inherit = "account.common.report"
amount_currency = fields.Boolean('With Currency', help="Print Report with the currency column if the currency differs from the company currency.")
@@ -5,9 +5,9 @@ from odoo import fields, models
class AccountingCommonPartnerReport(models.TransientModel):
_name = 'account.common.partner.report'
_description = 'Account Common Partner Report'
_description = 'Common Partner Report'
_inherit = "account.common.report"
result_selection = fields.Selection([('customer', 'Receivable Accounts'),
('supplier', 'Payable Accounts'),
('customer_supplier', 'Receivable and Payable Accounts')
@@ -7,7 +7,7 @@ from odoo.exceptions import UserError
class AccountPartnerLedger(models.TransientModel):
_inherit = "account.common.partner.report"
_name = "account.report.partner.ledger"
_description = "Account Partner Ledger"
_description = "Account Partner Ledger Report"
amount_currency = fields.Boolean("With Currency", help="It adds the currency column on report if the currency differs from the company currency.")
reconciled = fields.Boolean('Reconciled Entries')
+2
View File
@@ -40,6 +40,7 @@ class CashBox(models.TransientModel):
class CashBoxIn(CashBox):
_name = 'cash.box.in'
_description = 'Cash Box In'
ref = fields.Char('Reference')
@@ -60,6 +61,7 @@ class CashBoxIn(CashBox):
class CashBoxOut(CashBox):
_name = 'cash.box.out'
_description = 'Cash Box Out'
@api.multi
def _calculate_values_for_statement_line(self, record):
+2
View File
@@ -6,6 +6,7 @@ from odoo import api, fields, models
class FinancialYearOpeningWizard(models.TransientModel):
_name = 'account.financial.year.op'
_description = 'Opening Balance of Financial Year'
company_id = fields.Many2one(comodel_name='res.company', required=True)
opening_move_posted = fields.Boolean(string='Opening Move Posted', compute='_compute_opening_move_posted')
@@ -30,6 +31,7 @@ class FinancialYearOpeningWizard(models.TransientModel):
class SetupBarBankConfigWizard(models.TransientModel):
_inherits = {'res.partner.bank': 'res_partner_bank_id'}
_name = 'account.setup.bank.manual.config'
_description = 'Bank setup manual config'
res_partner_bank_id = fields.Many2one(comodel_name='res.partner.bank', ondelete='cascade', required=True)
create_or_link_option = fields.Selection(selection=[('new', 'Create new journal'), ('link', 'Link to an existing journal')], default='new')
@@ -6,7 +6,7 @@ from odoo import models, fields, api
class TaxAdjustments(models.TransientModel):
_name = 'tax.adjustments.wizard'
_description = 'Wizard for Tax Adjustments'
_description = 'Tax Adjustments Wizard'
@api.multi
def _get_default_journal(self):
+2 -2
View File
@@ -12,7 +12,7 @@ from odoo.tools import float_compare, float_is_zero
class AccountAssetCategory(models.Model):
_name = 'account.asset.category'
_description = 'Asset category'
_description = 'Asset Category'
active = fields.Boolean(default=True)
name = fields.Char(required=True, index=True, string="Asset Type")
@@ -472,7 +472,7 @@ class AccountAssetAsset(models.Model):
class AccountAssetDepreciationLine(models.Model):
_name = 'account.asset.depreciation.line'
_description = 'Asset depreciation line'
_description = 'Asset Depreciation Line'
name = fields.Char(string='Depreciation Name', required=True, index=True)
sequence = fields.Integer(required=True)
@@ -6,7 +6,7 @@ from odoo import api, fields, models, _
class AssetDepreciationConfirmationWizard(models.TransientModel):
_name = "asset.depreciation.confirmation.wizard"
_description = "asset.depreciation.confirmation.wizard"
_description = "Assets Depreciation Confirmation wizard"
date = fields.Date('Account Date', required=True, help="Choose the period for which you want to automatically post the depreciation lines of running assets", default=fields.Date.context_today)
@@ -5,7 +5,7 @@ from odoo import api, fields, models
class AccountBankStatementImportJounalCreation(models.TransientModel):
_name = 'account.bank.statement.import.journal.creation'
_description = 'Import Bank Statement Journal Creation Wizard'
_description = 'Journal Creation on Bank Statement Import'
journal_id = fields.Many2one('account.journal', delegate=True, required=True, ondelete='cascade')
@@ -14,6 +14,7 @@ result = res
class AccountingAssertTest(models.Model):
_name = "accounting.assert.test"
_description = 'Accounting Assert Test'
_order = "sequence"
name = fields.Char(string='Test Name', required=True, index=True, translate=True)
@@ -11,6 +11,7 @@ from odoo.tools.safe_eval import safe_eval
class ReportAssertAccount(models.AbstractModel):
_name = 'report.account_test.report_accounttest'
_description = 'Account Test Report'
@api.model
def execute_code(self, code_exec):
@@ -396,7 +396,7 @@ class AccountVoucher(models.Model):
class AccountVoucherLine(models.Model):
_name = 'account.voucher.line'
_description = 'Voucher Lines'
_description = 'Accounting Voucher Line'
name = fields.Text(string='Description', required=True)
sequence = fields.Integer(default=10,
@@ -9,6 +9,7 @@ from odoo.exceptions import ValidationError
class AccountAnalyticDistribution(models.Model):
_name = 'account.analytic.distribution'
_description = 'Analytic Account Distribution'
_rec_name = 'account_id'
account_id = fields.Many2one('account.analytic.account', string='Analytic Account', required=True)
@@ -10,6 +10,7 @@ class BarcodeEventsMixin(models.AbstractModel):
"""
_name = 'barcodes.barcode_events_mixin'
_description = 'Barcode Event Mixin'
_barcode_scanned = fields.Char("Barcode Scanned", help="Value of the last barcode scanned.", store=False)
+2
View File
@@ -16,6 +16,7 @@ UPC_EAN_CONVERSIONS = [
class BarcodeNomenclature(models.Model):
_name = 'barcode.nomenclature'
_description = 'Barcode Nomenclature'
name = fields.Char(string='Barcode Nomenclature', size=32, required=True, help='An internal identification of the barcode nomenclature')
rule_ids = fields.One2many('barcode.rule', 'barcode_nomenclature_id', string='Rules', help='The list of barcode rules')
@@ -167,6 +168,7 @@ class BarcodeNomenclature(models.Model):
class BarcodeRule(models.Model):
_name = 'barcode.rule'
_description = 'Barcode Rule'
_order = 'sequence asc'
+2 -2
View File
@@ -7,7 +7,7 @@ from odoo import fields, models, api
class LeadTest(models.Model):
_name = "base.automation.lead.test"
_description = "Action Rule Test"
_description = "Automated Rule Test"
name = fields.Char(string='Subject', required=True, index=True)
user_id = fields.Many2one('res.users', string='Responsible')
@@ -34,7 +34,7 @@ class LeadTest(models.Model):
class LineTest(models.Model):
_name = "base.automation.line.test"
_description = "Action Rule Line Test"
_description = "Automated Rule Line Test"
name = fields.Char()
lead_id = fields.Many2one('base.automation.lead.test', ondelete='cascade')
+2
View File
@@ -85,6 +85,7 @@ class ImportMapping(models.Model):
time.
"""
_name = 'base_import.mapping'
_description = 'Base Import Mapping'
res_model = fields.Char(index=True)
column_name = fields.Char()
@@ -107,6 +108,7 @@ class ResUsers(models.Model):
class Import(models.TransientModel):
_name = 'base_import.import'
_description = 'Base Import'
# allow imports to survive for 12h in case user is slow
_transient_max_hours = 12.0
+13 -1
View File
@@ -8,68 +8,80 @@ def name(suffix_name):
class Char(models.Model):
_name = name('char')
_description = 'Tests : Base Import Model, Character'
value = fields.Char()
class CharRequired(models.Model):
_name = name('char.required')
_description = 'Tests : Base Import Model, Character required'
value = fields.Char(required=True)
class CharReadonly(models.Model):
_name = name('char.readonly')
_description = 'Tests : Base Import Model, Character readonly'
value = fields.Char(readonly=True)
class CharStates(models.Model):
_name = name('char.states')
_description = 'Tests : Base Import Model, Character states'
value = fields.Char(readonly=True, states={'draft': [('readonly', False)]})
class CharNoreadonly(models.Model):
_name = name('char.noreadonly')
_description = 'Tests : Base Import Model, Character No readonly'
value = fields.Char(readonly=True, states={'draft': [('invisible', True)]})
class CharStillreadonly(models.Model):
_name = name('char.stillreadonly')
_description = 'Tests : Base Import Model, Character still readonly'
value = fields.Char(readonly=True, states={'draft': [('readonly', True)]})
# TODO: complex field (m2m, o2m, m2o)
class M2o(models.Model):
_name = name('m2o')
_description = 'Tests : Base Import Model, Many to One'
value = fields.Many2one(name('m2o.related'))
class M2oRelated(models.Model):
_name = name('m2o.related')
_description = 'Tests : Base Import Model, Many to One related'
value = fields.Integer(default=42)
class M2oRequired(models.Model):
_name = name('m2o.required')
_description = 'Tests : Base Import Model, Many to One required'
value = fields.Many2one(name('m2o.required.related'), required=True)
class M2oRequiredRelated(models.Model):
_name = name('m2o.required.related')
_description = 'Tests : Base Import Model, Many to One required related'
value = fields.Integer(default=42)
class O2m(models.Model):
_name = name('o2m')
_description = 'Tests : Base Import Model, One to Many'
value = fields.One2many(name('o2m.child'), 'parent_id')
class O2mChild(models.Model):
_name = name('o2m.child')
_description = 'Tests : Base Import Model, One to Many child'
parent_id = fields.Many2one(name('o2m'))
value = fields.Integer()
class PreviewModel(models.Model):
_name = name('preview')
_description = 'Tests : Base Import Model Preview'
name = fields.Char('Name')
somevalue = fields.Integer(string='Some Value', required=True)
@@ -52,6 +52,7 @@ class IrModelFields(models.Model):
class TestSparse(models.TransientModel):
_name = 'sparse_fields.test'
_description = 'Sparse fields Test'
data = fields.Serialized()
boolean = fields.Boolean(sparse='data')
+1
View File
@@ -32,6 +32,7 @@ def hashable(key):
class ImBus(models.Model):
_name = 'bus.bus'
_description = 'Communication Bus'
channel = fields.Char('Channel')
message = fields.Char('Message')
+5 -3
View File
@@ -92,6 +92,7 @@ def sort_remap(f):
class Contacts(models.Model):
_name = 'calendar.contacts'
_description = 'Calendar Contacts'
user_id = fields.Many2one('res.users', 'Me', required=True, default=lambda self: self.env.user)
partner_id = fields.Many2one('res.partner', 'Employee', required=True)
@@ -111,7 +112,7 @@ class Attendee(models.Model):
_name = 'calendar.attendee'
_rec_name = 'common_name'
_description = 'Calendar Registration'
_description = 'Calendar Attendee Information'
def _default_access_token(self):
return uuid.uuid4().hex
@@ -240,6 +241,7 @@ class Attendee(models.Model):
class AlarmManager(models.AbstractModel):
_name = 'calendar.alarm_manager'
_description = 'Event Alarm Manager'
def get_next_potential_limit_alarm(self, alarm_type, seconds=None, partner_id=None):
result = {}
@@ -471,7 +473,7 @@ class AlarmManager(models.AbstractModel):
class Alarm(models.Model):
_name = 'calendar.alarm'
_description = 'Event alarm'
_description = 'Event Alarm'
@api.depends('interval', 'duration')
def _compute_duration_minutes(self):
@@ -527,7 +529,7 @@ class Alarm(models.Model):
class MeetingType(models.Model):
_name = 'calendar.event.type'
_description = 'Meeting Type'
_description = 'Event Meeting Type'
name = fields.Char('Name', required=True)
+2 -2
View File
@@ -1234,7 +1234,7 @@ class Lead(models.Model):
class Tag(models.Model):
_name = "crm.lead.tag"
_description = "Category of lead"
_description = "Lead Tag"
name = fields.Char('Name', required=True, translate=True)
color = fields.Integer('Color Index')
@@ -1246,7 +1246,7 @@ class Tag(models.Model):
class LostReason(models.Model):
_name = "crm.lost.reason"
_description = 'Reason for loosing leads'
_description = 'Opp. Lost Reason'
name = fields.Char('Name', required=True, translate=True)
active = fields.Boolean('Active', default=True)
+1 -1
View File
@@ -18,7 +18,7 @@ class Stage(models.Model):
Stages are for example used to display the kanban view of records.
"""
_name = "crm.stage"
_description = "Stage of case"
_description = "CRM Stages"
_rec_name = 'name'
_order = "sequence, name, id"
+1
View File
@@ -11,6 +11,7 @@ from odoo.exceptions import ValidationError
class Team(models.Model):
_name = 'crm.team'
_inherit = ['mail.alias.mixin', 'crm.team']
_description = 'Sales Channels'
use_leads = fields.Boolean('Leads', help="Check this box to filter and qualify incoming requests as leads before converting them into opportunities and assigning them to a salesperson.")
use_opportunities = fields.Boolean('Pipeline', help="Check this box to manage a presales process with opportunities.")
+2 -2
View File
@@ -9,7 +9,7 @@ from odoo.tools.translate import _
class Lead2OpportunityPartner(models.TransientModel):
_name = 'crm.lead2opportunity.partner'
_description = 'Lead To Opportunity Partner'
_description = 'Convert Lead to Opportunity (not in mass)'
_inherit = 'crm.partner.binding'
@api.model
@@ -157,7 +157,7 @@ class Lead2OpportunityPartner(models.TransientModel):
class Lead2OpportunityMassConvert(models.TransientModel):
_name = 'crm.lead2opportunity.partner.mass'
_description = 'Mass Lead To Opportunity Partner'
_description = 'Convert Lead to Opportunity (in mass)'
_inherit = 'crm.lead2opportunity.partner'
@api.model
+1 -1
View File
@@ -15,7 +15,7 @@ class MergeOpportunity(models.TransientModel):
"""
_name = 'crm.merge.opportunity'
_description = 'Merge opportunities'
_description = 'Merge Opportunities'
@api.model
def default_get(self, fields):
+1 -1
View File
@@ -15,7 +15,7 @@ class PartnerBinding(models.TransientModel):
"""
_name = 'crm.partner.binding'
_description = 'Handle partner binding or generation in CRM wizards.'
_description = 'Partner linking/binding in CRM wizard'
@api.model
def default_get(self, fields):
@@ -7,6 +7,7 @@ class CrmLeadConvert2Task(models.TransientModel):
_name = "crm.lead.convert2task"
_inherit = 'crm.partner.binding'
_description = 'Lead convert to Task'
@api.model
def default_get(self, fields):
@@ -5,6 +5,7 @@ from odoo import api, fields, models, tools
class DecimalPrecision(models.Model):
_name = 'decimal.precision'
_description = 'Decimal Precision'
name = fields.Char('Usage', index=True, required=True)
digits = fields.Integer('Digits', required=True, default=2)
@@ -61,6 +62,7 @@ class DecimalPrecisionFloat(models.AbstractModel):
class DecimalPrecisionTestModel(models.Model):
_name = 'decimal.precision.test'
_description = 'Decimal Precision Test'
float = fields.Float()
float_2 = fields.Float(digits=(16, 2))
+1 -1
View File
@@ -11,7 +11,7 @@ _logger = logging.getLogger(__name__)
class DeliveryCarrier(models.Model):
_name = 'delivery.carrier'
_description = "Carrier"
_description = "Delivery Methods"
_order = 'sequence, id'
''' A Shipping Provider
+1 -1
View File
@@ -334,7 +334,7 @@ class EventEvent(models.Model):
class EventRegistration(models.Model):
_name = 'event.registration'
_description = 'Attendee'
_description = 'Event Registration'
_inherit = ['mail.thread']
_order = 'name, create_date desc'
+1 -1
View File
@@ -24,7 +24,7 @@ class EventTypeMail(models.Model):
""" Template of event.mail to attach to event.type. Those will be copied
upon all events created in that type to ease event creation. """
_name = 'event.type.mail'
_description = 'Mail Scheduling on Event Type'
_description = 'Mail Scheduling on Event Category'
event_type_id = fields.Many2one(
'event.type', string='Event Type',
+1
View File
@@ -7,6 +7,7 @@ from odoo import models, api
class event_confirm(models.TransientModel):
"""Event Confirmation"""
_name = "event.confirm"
_description = 'Event Confirmation'
@api.multi
def confirm(self):
@@ -5,6 +5,7 @@ from odoo import models, fields, api
class RegistrationEditor(models.TransientModel):
_name = "registration.editor"
_description = 'Edit Attendee Details on Sales Confirmation'
sale_order_id = fields.Many2one('sale.order', 'Sales Order', required=True)
event_registration_ids = fields.One2many('registration.editor.line', 'editor_id', string='Registrations to Edit')
@@ -62,6 +63,7 @@ class RegistrationEditor(models.TransientModel):
class RegistrationEditorLine(models.TransientModel):
"""Event Registration"""
_name = "registration.editor.line"
_description = 'Edit Attendee Line on Sales Confirmation'
editor_id = fields.Many2one('registration.editor')
sale_order_line_id = fields.Many2one('sale.order.line', string='Sales Order Line')
+1 -1
View File
@@ -22,7 +22,7 @@ class FetchmailServer(models.Model):
"""Incoming POP/IMAP mail server account"""
_name = 'fetchmail.server'
_description = "POP/IMAP Server"
_description = 'Incoming Mail Server'
_order = 'priority'
name = fields.Char('Name', required=True)
+4 -2
View File
@@ -10,7 +10,7 @@ from odoo.osv import expression
class FleetVehicle(models.Model):
_inherit = ['mail.thread', 'mail.activity.mixin']
_name = 'fleet.vehicle'
_description = 'Information on a vehicle'
_description = 'Vehicle'
_order = 'license_plate asc, acquisition_date asc'
def _get_default_state(self):
@@ -313,6 +313,7 @@ class FleetVehicleOdometer(models.Model):
class FleetVehicleState(models.Model):
_name = 'fleet.vehicle.state'
_order = 'sequence asc'
_description = 'Vehicle Status'
name = fields.Char(required=True)
sequence = fields.Integer(help="Used to order the note stages")
@@ -322,6 +323,7 @@ class FleetVehicleState(models.Model):
class FleetVehicleTag(models.Model):
_name = 'fleet.vehicle.tag'
_description = 'Vehicle Tag'
name = fields.Char(required=True, translate=True)
color = fields.Integer('Color Index')
@@ -331,7 +333,7 @@ class FleetVehicleTag(models.Model):
class FleetServiceType(models.Model):
_name = 'fleet.service.type'
_description = 'Type of services available on a vehicle'
_description = 'Fleet Service Type'
name = fields.Char(required=True, translate=True)
category = fields.Selection([
+2 -2
View File
@@ -12,7 +12,7 @@ class BadgeUser(models.Model):
"""User having received a badge"""
_name = 'gamification.badge.user'
_description = 'Gamification user badge'
_description = 'Gamification User Badge'
_order = "create_date desc"
_rec_name = "badge_name"
@@ -60,7 +60,7 @@ class GamificationBadge(models.Model):
TOO_MANY = 5
_name = 'gamification.badge'
_description = 'Gamification badge'
_description = 'Gamification Badge'
_inherit = ['mail.thread']
name = fields.Char('Badge', required=True, translate=True)
+1 -1
View File
@@ -56,7 +56,7 @@ class Challenge(models.Model):
"""
_name = 'gamification.challenge'
_description = 'Gamification challenge'
_description = 'Gamification Challenge'
_inherit = 'mail.thread'
_order = 'end_date, start_date, name, id'
+2 -2
View File
@@ -21,7 +21,7 @@ class GoalDefinition(models.Model):
a new gamification_goal_definition
"""
_name = 'gamification.goal.definition'
_description = 'Gamification goal definition'
_description = 'Gamification Goal Definition'
name = fields.Char("Goal Definition", required=True, translate=True)
description = fields.Text("Goal Description")
@@ -146,7 +146,7 @@ class Goal(models.Model):
An individual goal for a user on a specified time period"""
_name = 'gamification.goal'
_description = 'Gamification goal instance'
_description = 'Gamification Goal'
_order = 'start_date desc, end_date desc, definition_id, id'
definition_id = fields.Many2one('gamification.goal.definition', string="Goal Definition", required=True, ondelete="cascade")
@@ -7,6 +7,7 @@ from odoo import api, fields, models, _, exceptions
class grant_badge_wizard(models.TransientModel):
""" Wizard allowing to grant a badge to a user"""
_name = 'gamification.badge.user.wizard'
_description = 'Gamification User Badge Wizard'
user_id = fields.Many2one("res.users", string='User', required=True)
badge_id = fields.Many2one("gamification.badge", string='Badge', required=True)
@@ -6,6 +6,7 @@ from odoo import api, models, fields
class goal_manual_wizard(models.TransientModel):
"""Wizard to update a manual goal"""
_name = 'gamification.goal.wizard'
_description = 'Gamification Goal Wizard'
goal_id = fields.Many2one("gamification.goal", string='Goal', required=True)
current = fields.Float('Current')
@@ -25,6 +25,7 @@ GOOGLE_API_BASE_URL = 'https://www.googleapis.com'
# FIXME : this needs to become an AbstractModel, to be inhereted by google_calendar_service and google_drive_service
class GoogleService(models.TransientModel):
_name = 'google.service'
_description = 'Google Service'
@api.model
def generate_refresh_token(self, service, authorization_code):
@@ -189,6 +189,7 @@ class Exclude(SyncOperation):
class GoogleCalendar(models.AbstractModel):
STR_SERVICE = 'calendar'
_name = 'google.%s' % STR_SERVICE
_description = 'Google Calendar'
def generate_data(self, event, isCreating=False):
if event.allday:
@@ -12,7 +12,7 @@ class HrExpenseRefuseWizard(models.TransientModel):
"""
_name = "hr.expense.refuse.wizard"
_description = "Expense refuse Reason wizard"
_description = "Expense Refuse Reason Wizard"
reason = fields.Char(string='Reason', required=True)
hr_expense_ids = fields.Many2many('hr.expense')
@@ -8,7 +8,7 @@ from werkzeug import url_encode
class HrExpenseSheetRegisterPaymentWizard(models.TransientModel):
_name = "hr.expense.sheet.register.payment.wizard"
_description = "Expense Report Register Payment wizard"
_description = "Expense Register Payment Wizard"
@api.model
def _default_partner_id(self):
-2
View File
@@ -5,8 +5,6 @@ from odoo import fields, models
class CalendarLeaves(models.Model):
_inherit = "resource.calendar.leaves"
_description = "Leave Detail"
holiday_id = fields.Many2one("hr.leave", string='Leave Request')
@@ -11,6 +11,7 @@ from odoo.exceptions import UserError
class HrHolidaySummaryReport(models.AbstractModel):
_name = 'report.hr_holidays.report_holidayssummary'
_description = 'Holidays Summary Report'
def _get_header_info(self, start_date, holiday_type):
st_date = fields.Date.from_string(start_date)
@@ -95,6 +95,7 @@ class HrSalaryRuleCategory(models.Model):
class HrSalaryRule(models.Model):
_name = 'hr.salary.rule'
_order = 'sequence, id'
_description = 'Salary Rule'
name = fields.Char(required=True, translate=True)
code = fields.Char(required=True,
@@ -11,6 +11,7 @@ from odoo.exceptions import UserError
class ContributionRegisterReport(models.AbstractModel):
_name = 'report.hr_payroll.report_contributionregister'
_description = 'Payroll Contribution Register Report'
def _get_payslip_lines(self, register_ids, date_from, date_to):
result = {}
@@ -5,6 +5,7 @@ from odoo import api, models
class PayslipDetailsReport(models.AbstractModel):
_name = 'report.hr_payroll.report_payslipdetails'
_description = 'Payslip Details Report'
def get_details_by_rule_category(self, payslip_lines):
PayslipLine = self.env['hr.payslip.line']
@@ -9,7 +9,7 @@ from odoo import api, fields, models
class PayslipLinesContributionRegister(models.TransientModel):
_name = 'payslip.lines.contribution.register'
_description = 'PaySlip Lines by Contribution Registers'
_description = 'Payslip Lines by Contribution Registers'
date_from = fields.Date(string='Date From', required=True,
default=datetime.now().strftime('%Y-%m-01'))
@@ -44,7 +44,7 @@ class RecruitmentSource(models.Model):
class RecruitmentStage(models.Model):
_name = "hr.recruitment.stage"
_description = "Stage of Recruitment"
_description = "Recruitment Stages"
_order = 'sequence'
name = fields.Char("Stage name", required=True, translate=True)
@@ -79,7 +79,7 @@ class RecruitmentStage(models.Model):
class RecruitmentDegree(models.Model):
_name = "hr.recruitment.degree"
_description = "Degree of Recruitment"
_description = "Applicant Degree"
_sql_constraints = [
('name_uniq', 'unique (name)', 'The name of the Degree of Recruitment must be unique!')
]
@@ -7,6 +7,7 @@ from odoo import api, fields, models
class TimesheetAttendance(models.Model):
_name = 'hr.timesheet.attendance.report'
_auto = False
_description = 'Timesheet Attendance Report'
user_id = fields.Many2one('res.users')
date = fields.Date()
+1
View File
@@ -137,6 +137,7 @@ def charge(env, key, account_token, credit, description=None, credit_template=No
class IapAccount(models.Model):
_name = 'iap.account'
_rec_name = 'service_name'
_description = 'IAP Account'
service_name = fields.Char()
account_token = fields.Char(default=lambda s: uuid.uuid4().hex)
@@ -208,7 +208,7 @@ class ImLivechatChannelRule(models.Model):
"""
_name = 'im_livechat.channel.rule'
_description = 'Channel Rules'
_description = 'Livechat Channel Rules'
_order = 'sequence asc'
@@ -30,6 +30,7 @@ class MailChannel(models.Model):
_name = 'mail.channel'
_inherit = ['mail.channel', 'rating.mixin']
_description = 'Discussion channel'
anonymous_name = fields.Char('Anonymous Name')
channel_type = fields.Selection(selection_add=[('livechat', 'Livechat Conversation')])
@@ -8,7 +8,7 @@ class ImLivechatReportChannel(models.Model):
""" Livechat Support Report on the Channels """
_name = "im_livechat.report.channel"
_description = "Livechat Support Report"
_description = "Livechat Support Channel Report"
_order = 'start_date, technical_name'
_auto = False
@@ -8,7 +8,7 @@ class ImLivechatReportOperator(models.Model):
""" Livechat Support Report on the Operator """
_name = "im_livechat.report.operator"
_description = "Livechat Support Report"
_description = "Livechat Support Operator Report"
_order = 'livechat_channel_id, partner_id'
_auto = False
+2
View File
@@ -7,6 +7,7 @@ from odoo import api, fields, models, exceptions
# ----------------------------------------------------------
class IotBox(models.Model):
_name = 'iot.box'
_description = 'IOT Box'
name = fields.Char('Name', readonly=True)
identifier = fields.Char(string='Identifier (Mac Address)', readonly=True)
@@ -17,6 +18,7 @@ class IotBox(models.Model):
class IotDevice(models.Model):
_name = 'iot.device'
_description = 'IOT Device'
iot_id = fields.Many2one('iot.box', string='IoT Box', required = True)
name = fields.Char('Name')
+1
View File
@@ -4,6 +4,7 @@ from odoo import fields, models
class ResCompany(models.Model):
_name = 'res.company'
_description = 'Companies'
_inherit = 'res.company'
l10n_sg_unique_entity_number = fields.Char(string='UEN', related="partner_id.l10n_sg_unique_entity_number")
@@ -31,6 +31,7 @@ class link_tracker(models.Model):
_name = "link.tracker"
_rec_name = "short_url"
_description = 'Link Tracker'
_inherit = ['utm.mixin']
@@ -204,6 +205,7 @@ class link_tracker(models.Model):
class link_tracker_code(models.Model):
_name = "link.tracker.code"
_description = 'Link Tracker Code'
code = fields.Char(string='Short URL Code', store=True)
link_id = fields.Many2one('link.tracker', 'Link', required=True, ondelete='cascade')
@@ -227,6 +229,7 @@ class link_tracker_code(models.Model):
class link_tracker_click(models.Model):
_name = "link.tracker.click"
_rec_name = "link_id"
_description = 'Link Tracker Click'
click_date = fields.Date(string='Create Date')
link_id = fields.Many2one('link.tracker', 'Link', required=True, ondelete='cascade')
+4 -4
View File
@@ -160,7 +160,7 @@ class LunchOrder(models.Model):
class LunchOrderLine(models.Model):
_name = 'lunch.order.line'
_description = 'lunch order line'
_description = 'Lunch Order Line'
_order = 'date desc, id desc'
name = fields.Char(related='product_id.name', string="Product Name", readonly=True)
@@ -321,7 +321,7 @@ class LunchOrderLine(models.Model):
class LunchProduct(models.Model):
""" Products available to order. A product is linked to a specific vendor. """
_name = 'lunch.product'
_description = 'lunch product'
_description = 'Lunch Product'
name = fields.Char('Product', required=True)
category_id = fields.Many2one('lunch.product.category', 'Product Category', required=True)
@@ -369,7 +369,7 @@ class LunchProduct(models.Model):
class LunchProductCategory(models.Model):
""" Category of the product such as pizza, sandwich, pasta, chinese, burger... """
_name = 'lunch.product.category'
_description = 'lunch product category'
_description = 'Lunch Product Category'
name = fields.Char('Product Category', required=True)
@@ -377,7 +377,7 @@ class LunchProductCategory(models.Model):
class LunchCashMove(models.Model):
""" Two types of cashmoves: payment (credit) or order (debit) """
_name = 'lunch.cashmove'
_description = 'lunch cashmove'
_description = 'Lunch Cashmove'
user_id = fields.Many2one('res.users', 'User',
default=lambda self: self.env.uid)
+1
View File
@@ -9,6 +9,7 @@ from odoo.exceptions import UserError
class LunchOrderLineLucky(models.TransientModel):
_name = 'lunch.order.line.lucky'
_description = 'Lunch Order Line Lucky'
def _default_supplier(self):
suppliers_obj = self.env['lunch.product'].search([]).mapped("supplier")
+1
View File
@@ -10,6 +10,7 @@ from odoo.exceptions import UserError, ValidationError
class ServerActions(models.Model):
""" Add email option in server actions. """
_name = 'ir.actions.server'
_description = 'Server Action'
_inherit = ['ir.actions.server']
state = fields.Selection(selection_add=[
+1
View File
@@ -186,6 +186,7 @@ class AliasMixin(models.AbstractModel):
"""
_name = 'mail.alias.mixin'
_inherits = {'mail.alias': 'alias_id'}
_description = 'Email Aliases Mixin'
alias_id = fields.Many2one('mail.alias', string='Alias', ondelete="restrict", required=True)
+1 -1
View File
@@ -54,7 +54,7 @@ class Moderation(models.Model):
class Channel(models.Model):
""" A mail.channel is a discussion group that may behave like a listener
on documents. """
_description = 'Discussion channel'
_description = 'Discussion Channel'
_name = 'mail.channel'
_mail_flat_thread = False
_mail_post_access = 'read'
+2
View File
@@ -16,6 +16,7 @@ class Users(models.Model):
"""
_name = 'res.users'
_inherit = ['res.users']
_description = 'Users'
alias_id = fields.Many2one('mail.alias', 'Alias', ondelete="set null", required=False,
help="Email address internally associated with this user. Incoming "\
@@ -149,6 +150,7 @@ class res_groups_mail_channel(models.Model):
"""
_name = 'res.groups'
_inherit = 'res.groups'
_description = 'Access Groups'
@api.multi
def write(self, vals, context=None):
+1
View File
@@ -20,6 +20,7 @@ _logger = logging.getLogger(__name__)
class PublisherWarrantyContract(AbstractModel):
_name = "publisher_warranty.contract"
_description = 'Publisher Warranty Contract'
@api.model
def _get_message(self):
+1
View File
@@ -9,6 +9,7 @@ from odoo import models, _
class MailBot(models.AbstractModel):
_name = 'mail.bot'
_description = 'Mail Bot'
def _apply_logic(self, record, values, command=None):
""" Apply bot logic to generate an answer (or not) for the user
+2 -2
View File
@@ -23,7 +23,7 @@ class MaintenanceStage(models.Model):
class MaintenanceEquipmentCategory(models.Model):
_name = 'maintenance.equipment.category'
_inherit = ['mail.alias.mixin', 'mail.thread']
_description = 'Asset Category'
_description = 'Maintenance Equipment Category'
@api.one
@api.depends('equipment_ids')
@@ -92,7 +92,7 @@ class MaintenanceEquipmentCategory(models.Model):
class MaintenanceEquipment(models.Model):
_name = 'maintenance.equipment'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = 'Equipment'
_description = 'Maintenance Equipment'
@api.multi
def _track_subtype(self, init_values):
@@ -6,7 +6,7 @@ from odoo import api, fields, models
class MassMailingListMerge(models.TransientModel):
_name = 'mass.mailing.list.merge'
_description = 'Merge Mass Mailing Lists'
_description = 'Merge Mass Mailing List'
src_list_ids = fields.Many2many('mail.mass_mailing.list', string='Mailing Lists')
dest_list_id = fields.Many2one('mail.mass_mailing.list', string='Destination Mailing List')
@@ -7,7 +7,7 @@ from odoo.exceptions import ValidationError
class MassMailingScheduleDate(models.TransientModel):
_name = 'mass.mailing.schedule.date'
_description = 'Schedule in the Future'
_description = 'Mass Mailing Scheduling'
schedule_date = fields.Datetime(string='Schedule in the Future')
mass_mailing_id = fields.Many2one('mail.mass_mailing', required=True)
+1
View File
@@ -19,6 +19,7 @@ class MembershipLine(models.Model):
_name = 'membership.membership_line'
_rec_name = 'partner'
_order = 'id desc'
_description = 'Membership Line'
partner = fields.Many2one('res.partner', string='Partner', ondelete='cascade', index=True)
membership_id = fields.Many2one('product.product', string="Membership", required=True)
@@ -18,7 +18,7 @@ class ReportMembership(models.Model):
'''Membership Analysis'''
_name = 'report.membership'
_description = __doc__
_description = 'Membership Analysis'
_auto = False
_rec_name = 'start_date'
+1
View File
@@ -206,6 +206,7 @@ class MrpBomLine(models.Model):
_name = 'mrp.bom.line'
_order = "sequence, id"
_rec_name = "product_id"
_description = 'Bill of Material Line'
def _get_default_product_uom_id(self):
return self.env['uom.uom'].search([], limit=1, order='id').id
+1 -1
View File
@@ -11,7 +11,7 @@ from odoo.tools import float_compare, float_round
class MrpProduction(models.Model):
""" Manufacturing Orders """
_name = 'mrp.production'
_description = 'Manufacturing Order'
_description = 'Production Order'
_date_name = 'date_planned_start'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'date_planned_start asc,id'
+2 -1
View File
@@ -175,6 +175,7 @@ class MrpWorkcenter(models.Model):
class MrpWorkcenterProductivityLossType(models.Model):
_name = "mrp.workcenter.productivity.loss.type"
_description = 'MRP Workorder productivity losses'
_rec_name = 'loss_type'
@api.depends('loss_type')
@@ -197,7 +198,7 @@ class MrpWorkcenterProductivityLossType(models.Model):
class MrpWorkcenterProductivityLoss(models.Model):
_name = "mrp.workcenter.productivity.loss"
_description = "TPM Big Losses"
_description = "Workcenter Productivity Losses"
_order = "sequence, id"
name = fields.Char('Reason', required=True)
@@ -7,6 +7,7 @@ from odoo.tools import float_round
class ReportBomStructure(models.AbstractModel):
_name = 'report.mrp.report_bom_structure'
_description = 'BOM Structure Report'
@api.model
def _get_report_values(self, docids, data=None):
+1 -1
View File
@@ -9,7 +9,7 @@ from odoo.tools import float_is_zero, float_round
class ChangeProductionQty(models.TransientModel):
_name = 'change.production.qty'
_description = 'Change Quantity of Products'
_description = 'Change Production Qty'
# TDE FIXME: add production_id field
mo_id = fields.Many2one('mrp.production', 'Manufacturing Order', required=True)

Some files were not shown because too many files have changed in this diff Show More