[IMP]account_*: Improvement in model description

Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
This commit is contained in:
Nimesh Jethva
2018-09-21 11:45:14 +02:00
committed by Yannick Tivisse
parent 05749032b3
commit 7246170de6
37 changed files with 48 additions and 24 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)
+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")
@@ -1030,6 +1030,7 @@ class PaymentTransaction(models.Model):
class PaymentToken(models.Model):
_name = 'payment.token'
_order = 'partner_id, id desc'
_description = 'Payment Token'
name = fields.Char('Name', help='Name of the payment token')
short_name = fields.Char('Short name', compute='_compute_short_name')
@@ -7,6 +7,7 @@ from odoo.exceptions import UserError
class PaymentWizard(models.TransientModel):
_name = 'payment.acquirer.onboarding.wizard'
_description = 'Payment acquire onboarding wizard'
payment_method = fields.Selection([
('paypal', "Pay with PayPal"),