[IMP] cleanup of help messages in all modules

This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
This commit is contained in:
Fabien Pinckaers
2022-08-02 00:26:53 +02:00
parent 45c3121ce7
commit 3363e55cac
152 changed files with 388 additions and 469 deletions
+5 -5
View File
@@ -33,8 +33,8 @@ class AccountAccount(models.Model):
raise ValidationError(_('You cannot have more than one account with "Current Year Earnings" as type. (accounts: %s)', [a.code for a in account_unaffected_earnings]))
name = fields.Char(string="Account Name", required=True, index='trigram', tracking=True)
currency_id = fields.Many2one('res.currency', string='Account Currency',
help="Forces all moves for this account to have this account currency.", tracking=True)
currency_id = fields.Many2one('res.currency', string='Account Currency', tracking=True,
help="Forces all journal items in this account to have a specific currency (i.e. bank journals). If no currency is set, entries can use any currency.")
code = fields.Char(size=64, required=True, tracking=True)
deprecated = fields.Boolean(default=False, tracking=True)
used = fields.Boolean(compute='_compute_used', search='_search_used')
@@ -96,9 +96,9 @@ class AccountAccount(models.Model):
root_id = fields.Many2one('account.root', compute='_compute_account_root', store=True)
allowed_journal_ids = fields.Many2many('account.journal', string="Allowed Journals", help="Define in which journals this account can be used. If empty, can be used in all journals.")
opening_debit = fields.Monetary(string="Opening Debit", compute='_compute_opening_debit_credit', inverse='_set_opening_debit', help="Opening debit value for this account.")
opening_credit = fields.Monetary(string="Opening Credit", compute='_compute_opening_debit_credit', inverse='_set_opening_credit', help="Opening credit value for this account.")
opening_balance = fields.Monetary(string="Opening Balance", compute='_compute_opening_debit_credit', help="Opening balance value for this account.")
opening_debit = fields.Monetary(string="Opening Debit", compute='_compute_opening_debit_credit', inverse='_set_opening_debit')
opening_credit = fields.Monetary(string="Opening Credit", compute='_compute_opening_debit_credit', inverse='_set_opening_credit')
opening_balance = fields.Monetary(string="Opening Balance", compute='_compute_opening_debit_credit')
is_off_balance = fields.Boolean(compute='_compute_is_off_balance', default=False, store=True, readonly=True)
@@ -22,7 +22,7 @@ class AccountCashboxLine(models.Model):
cashbox_line.subtotal = cashbox_line.coin_value * cashbox_line.number
coin_value = fields.Float(string='Coin/Bill Value', required=True, digits=0)
number = fields.Integer(string='#Coins/Bills', help='Opening Unit Numbers')
number = fields.Integer(string='Number of Coins/Bills')
subtotal = fields.Float(compute='_sub_total', string='Subtotal', digits=0, readonly=True)
cashbox_id = fields.Many2one('account.bank.statement.cashbox', string="Cashbox")
currency_id = fields.Many2one('res.currency', related='cashbox_id.currency_id')
@@ -223,7 +223,7 @@ class AccountBankStatement(models.Model):
"- Validated: All lines are reconciled. There is nothing left to process.")
currency_id = fields.Many2one('res.currency', compute='_compute_currency', string="Currency")
journal_id = fields.Many2one('account.journal', string='Journal', required=True, states={'confirm': [('readonly', True)]}, default=_default_journal, check_company=True)
journal_type = fields.Selection(related='journal_id.type', help="Technical field used for usability purposes")
journal_type = fields.Selection(related='journal_id.type') # used for usability purposes
company_id = fields.Many2one('res.company', related='journal_id.company_id', string='Company', store=True, readonly=True)
total_entry_encoding = fields.Monetary('Transactions Subtotal', compute='_end_balance', store=True, help="Total of transaction lines.")
@@ -234,16 +234,14 @@ class AccountBankStatement(models.Model):
move_line_ids = fields.One2many('account.move.line', 'statement_id', string='Entry lines', states={'confirm': [('readonly', True)]})
move_line_count = fields.Integer(compute="_get_move_line_count")
all_lines_reconciled = fields.Boolean(compute='_compute_all_lines_reconciled',
help="Technical field indicating if all statement lines are fully reconciled.")
all_lines_reconciled = fields.Boolean(compute='_compute_all_lines_reconciled') # are all statement lines are fully reconciled?
user_id = fields.Many2one('res.users', string='Responsible', required=False, default=lambda self: self.env.user)
cashbox_start_id = fields.Many2one('account.bank.statement.cashbox', string="Starting Cashbox")
cashbox_end_id = fields.Many2one('account.bank.statement.cashbox', string="Ending Cashbox")
is_difference_zero = fields.Boolean(compute='_is_difference_zero', string='Is zero', help="Check if difference is zero.")
previous_statement_id = fields.Many2one('account.bank.statement', help='technical field to compute starting balance correctly', compute='_get_previous_statement', store=True)
previous_statement_id = fields.Many2one('account.bank.statement', compute='_get_previous_statement', store=True)
is_valid_balance_start = fields.Boolean(string="Is Valid Balance Start", store=True,
compute="_compute_is_valid_balance_start",
help="Technical field to display a warning message in case starting balance is different than previous ending balance")
compute="_compute_is_valid_balance_start") # used to display a warning message if starting balance is different than previous ending balance
country_code = fields.Char(related='company_id.account_fiscal_country_id.code')
def write(self, values):
+1 -1
View File
@@ -196,9 +196,9 @@ class AccountJournal(models.Model):
compute='_compute_available_payment_method_ids'
)
# used to hide or show payment method options if needed
selected_payment_method_codes = fields.Char(
compute='_compute_selected_payment_method_codes',
help='Technical field used to hide or show payment method options if needed.'
)
_sql_constraints = [
+49 -49
View File
@@ -159,7 +159,7 @@ class AccountMove(models.Model):
('cancel', 'Cancelled'),
], string='Status', required=True, readonly=True, copy=False, tracking=True,
default='draft')
posted_before = fields.Boolean(help="Technical field for knowing if the move has been posted before", copy=False)
posted_before = fields.Boolean(copy=False)
move_type = fields.Selection(selection=[
('entry', 'Journal Entry'),
('out_invoice', 'Customer Invoice'),
@@ -171,8 +171,7 @@ class AccountMove(models.Model):
], string='Type', required=True, store=True, index=True, readonly=True, tracking=True,
default="entry", change_default=True)
type_name = fields.Char('Type Name', compute='_compute_type_name')
is_storno = fields.Boolean(compute='_compute_is_storno', store=True, copy=False, readonly=False,
help='Utility field to express whether the journal entry is subject to storno accounting. That is when the company uses storno and the journal entry is a refund or a reversal.')
is_storno = fields.Boolean(compute='_compute_is_storno', store=True, copy=False, readonly=False)
to_check = fields.Boolean(string='To Check', default=False, tracking=True,
help='If this checkbox is ticked, it means that the user was not sure of all the related information at the time of the creation of the move and that the move needs to be checked again.')
journal_id = fields.Many2one('account.journal', string='Journal', required=True, readonly=True,
@@ -198,15 +197,15 @@ class AccountMove(models.Model):
commercial_partner_id = fields.Many2one('res.partner', string='Commercial Entity', store=True, readonly=True,
compute='_compute_commercial_partner_id', ondelete='restrict')
country_code = fields.Char(related='company_id.account_fiscal_country_id.code', readonly=True)
user_id = fields.Many2one(string='User', related='invoice_user_id',
help='Technical field used to fit the generic behavior in mail templates.')
# Technical field used to fit the generic behavior in mail templates.
user_id = fields.Many2one(string='User', related='invoice_user_id')
partner_shipping_id = fields.Many2one(
comodel_name='res.partner',
string='Delivery Address',
readonly=False,
store=True,
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]",
help="Delivery address for current invoice.",
compute='_compute_partner_shipping_id',
)
is_move_sent = fields.Boolean(
@@ -228,12 +227,13 @@ class AccountMove(models.Model):
statement_line_id = fields.Many2one(
comodel_name='account.bank.statement.line',
string="Statement Line", copy=False, check_company=True)
# used to open the linked bank statement from the edit button in a group by
# view, or via the smart button on journal entries.
statement_id = fields.Many2one(
related='statement_line_id.statement_id',
copy=False,
readonly=True,
help="Technical field used to open the linked bank statement from the edit button in a group by view,"
" or via the smart button on journal entries.")
readonly=True)
# === Amount fields ===
amount_untaxed = fields.Monetary(string='Untaxed Amount', store=True, readonly=True, tracking=True,
@@ -264,29 +264,30 @@ class AccountMove(models.Model):
readonly=True, copy=False, tracking=True, compute='_compute_amount')
# ==== Cash basis feature fields ====
# used to keep track of the tax cash basis reconciliation. This is needed
# when cancelling the source: it will post the inverse journal entry to
# cancel that part too.
tax_cash_basis_rec_id = fields.Many2one(
'account.partial.reconcile',
string='Tax Cash Basis Entry of',
help="Technical field used to keep track of the tax cash basis reconciliation. "
"This is needed when cancelling the source: it will post the inverse journal entry to cancel that part too.")
string='Tax Cash Basis Entry of')
tax_cash_basis_origin_move_id = fields.Many2one(
comodel_name='account.move',
index='btree_not_null',
string="Cash Basis Origin",
readonly=1,
help="The journal entry from which this tax cash basis journal entry has been created.")
readonly=1)
tax_cash_basis_created_move_ids = fields.One2many(
string="Cash Basis Entries",
comodel_name='account.move',
inverse_name='tax_cash_basis_origin_move_id',
help="The cash basis entries created from the taxes on this entry, when reconciling its lines."
)
# used by cash basis taxes, telling the lines of the move are always
# exigible. This happens if the move contains no payable or receivable line.
always_tax_exigible = fields.Boolean(
compute='_compute_always_tax_exigible',
store=True,
help="Technical field used by cash basis taxes, telling the lines of the move are always exigible. "
"This happens if the move contains no payable or receivable line.")
store=True)
# ==== Auto-post feature fields ====
auto_post = fields.Selection(
string='Auto-post',
@@ -386,16 +387,17 @@ class AccountMove(models.Model):
'Odoo will automatically create one invoice line with default values to match it.')
# ==== Display purpose fields ====
invoice_filter_type_domain = fields.Char(compute='_compute_invoice_filter_type_domain',
help="Technical field used to have a dynamic domain on journal / taxes in the form view.")
# used to have a dynamic domain on journal / taxes in the form view.
invoice_filter_type_domain = fields.Char(compute='_compute_invoice_filter_type_domain')
bank_partner_id = fields.Many2one('res.partner', help='Technical field to get the domain on the bank', compute='_compute_bank_partner_id')
tax_lock_date_message = fields.Char(
compute='_compute_tax_lock_date_message',
help="Technical field used to display a message when the invoice's accounting date is prior of the tax lock date.")
# used to display a message when the invoice's accounting date is prior of the tax lock date
tax_lock_date_message = fields.Char(compute='_compute_tax_lock_date_message')
# used for tracking the status of the currency
display_inactive_currency_warning = fields.Boolean(
compute="_compute_display_inactive_currency_warning",
help="Technical field used for tracking the status of the currency")
tax_country_id = fields.Many2one(comodel_name='res.country', compute='_compute_tax_country_id', help="Technical field to filter the available taxes depending on the fiscal country and fiscal position.")
compute="_compute_display_inactive_currency_warning")
# used to filter the available taxes depending on the fiscal country and fiscal position.
tax_country_id = fields.Many2one(comodel_name='res.country', compute='_compute_tax_country_id')
tax_country_code = fields.Char(compute="_compute_tax_country_code")
# Technical field to hide Reconciled Entries stat button
has_reconciled_entries = fields.Boolean(compute="_compute_has_reconciled_entries")
@@ -3686,8 +3688,7 @@ class AccountMoveLine(models.Model):
# ==== Business fields ====
move_id = fields.Many2one('account.move', string='Journal Entry',
index=True, required=True, readonly=True, auto_join=True, ondelete="cascade",
check_company=True,
help="The move of this entry line.")
check_company=True)
move_name = fields.Char(string='Number', related='move_id.name', store=True, index='btree')
date = fields.Date(related='move_id.date', store=True, readonly=True, index=True, copy=False, group_operator='min')
ref = fields.Char(related='move_id.ref', store=True, copy=False, index='trigram', readonly=True)
@@ -3695,13 +3696,11 @@ class AccountMoveLine(models.Model):
journal_id = fields.Many2one(related='move_id.journal_id', store=True, index=True, copy=False)
company_id = fields.Many2one(related='move_id.company_id', store=True, readonly=True)
company_currency_id = fields.Many2one(related='company_id.currency_id', string='Company Currency',
readonly=True, store=True,
help='Utility field to express amount currency')
readonly=True, store=True)
is_same_currency = fields.Boolean(compute='_compute_same_currency')
is_storno = fields.Boolean(
related='move_id.is_storno',
string='Company Storno Accounting',
help='Utility field to express whether the journal item is subject to storno accounting')
string='Company Storno Accounting')
account_id = fields.Many2one('account.account', string='Account',
index=True, ondelete="cascade",
domain="[('deprecated', '=', False), ('company_id', '=', 'company_id'),('is_off_balance', '=', False)]",
@@ -3722,8 +3721,7 @@ class AccountMoveLine(models.Model):
credit = fields.Monetary(string='Credit', default=0.0, currency_field='company_currency_id')
balance = fields.Monetary(string='Balance', store=True,
currency_field='company_currency_id',
compute='_compute_balance',
help="Technical field holding the debit - credit in order to open meaningful graph views from reports")
compute='_compute_balance')
cumulated_balance = fields.Monetary(string='Cumulated Balance', store=False,
currency_field='company_currency_id',
compute='_compute_cumulated_balance',
@@ -3763,19 +3761,16 @@ class AccountMoveLine(models.Model):
comodel_name='account.tax',
string="Taxes",
context={'active_test': False},
check_company=True,
help="Taxes that apply on the base amount")
check_company=True)
group_tax_id = fields.Many2one(
comodel_name='account.tax',
string="Originator Group of Taxes",
index='btree_not_null',
help="The group of taxes that generated this tax line",
index='btree_not_null'
)
tax_line_id = fields.Many2one('account.tax', string='Originator Tax', ondelete='restrict', store=True,
compute='_compute_tax_line_id', help="Indicates that this journal item is a tax line")
tax_group_id = fields.Many2one(related='tax_line_id.tax_group_id', string='Originator tax group',
readonly=True, store=True,
help='technical field for widget tax-group-custom-field')
readonly=True, store=True) # used in the widget tax-group-custom-field
tax_base_amount = fields.Monetary(string="Base Amount", store=True, readonly=True,
currency_field='company_currency_id')
tax_repartition_line_id = fields.Many2one(comodel_name='account.tax.repartition.line',
@@ -3786,9 +3781,10 @@ class AccountMoveLine(models.Model):
help="Tags assigned to this line by the tax creating it, if any. It determines its impact on financial reports.", tracking=True)
tax_audit = fields.Char(string="Tax Audit String", compute="_compute_tax_audit", store=True,
help="Computed field, listing the tax grids impacted by this line, and the amount it applies to each of them.")
tax_tag_invert = fields.Boolean(string="Invert Tags", compute='_compute_tax_tag_invert', store=True, readonly=False,
help="Technical field. True if the balance of this move line needs to be "
"inverted when computing its total for each tag (for sales invoices, for example).")
# Technical field. True if the balance of this move line needs to be
# inverted when computing its total for each tag (for sales invoices, for # example)
tax_tag_invert = fields.Boolean(string="Invert Tags", compute='_compute_tax_tag_invert', store=True, readonly=False)
# ==== Reconciliation fields ====
amount_residual = fields.Monetary(string='Residual Amount', store=True,
@@ -3814,14 +3810,18 @@ class AccountMoveLine(models.Model):
compute="_compute_analytic_tag_ids", store=True, readonly=False, check_company=True, copy=True)
# ==== Onchange / display purpose fields ====
recompute_tax_line = fields.Boolean(store=False, readonly=True,
help="Technical field used to know on which lines the taxes must be recomputed.")
# Technical field used to know on which lines the taxes must be recomputed.
recompute_tax_line = fields.Boolean(store=False, readonly=True)
display_type = fields.Selection([
('line_section', 'Section'),
('line_note', 'Note'),
], default=False, help="Technical field for UX purpose.")
is_rounding_line = fields.Boolean(help="Technical field used to retrieve the cash rounding line.")
exclude_from_invoice_tab = fields.Boolean(help="Technical field used to exclude some lines from the invoice_line_ids tab in the form view.")
], default=False)
# used to retrieve the cash rounding line.
is_rounding_line = fields.Boolean()
# used to exclude some lines from the invoice_line_ids tab in the form view.
exclude_from_invoice_tab = fields.Boolean()
_sql_constraints = [
(
@@ -57,9 +57,8 @@ class AccountPartialReconcile(models.Model):
related='debit_move_id.company_id')
max_date = fields.Date(
string="Max Date of Matched Lines", store=True,
compute='_compute_max_date',
help="Technical field used to determine at which date this reconciliation needs to be shown on the "
"aged receivable/payable reports.")
compute='_compute_max_date')
# used to determine at which date this reconciliation needs to be shown on the aged receivable/payable reports
# -------------------------------------------------------------------------
# CONSTRAINT METHODS
+13 -15
View File
@@ -28,11 +28,9 @@ class AccountPayment(models.Model):
check_company=True)
is_reconciled = fields.Boolean(string="Is Reconciled", store=True,
compute='_compute_reconciliation_status',
help="Technical field indicating if the payment is already reconciled.")
compute='_compute_reconciliation_status')
is_matched = fields.Boolean(string="Is Matched With a Bank Statement", store=True,
compute='_compute_reconciliation_status',
help="Technical field indicating if the payment has been matched with a statement line.")
compute='_compute_reconciliation_status')
available_partner_bank_ids = fields.Many2many(
comodel_name='res.partner.bank',
compute='_compute_available_partner_bank_ids',
@@ -46,9 +44,8 @@ class AccountPayment(models.Model):
readonly=False, store=True,
tracking=True,
compute="_compute_is_internal_transfer")
qr_code = fields.Char(string="QR Code",
compute="_compute_qr_code",
help="QR-code report URL to use to generate the QR-code to scan with a banking app to perform this payment.")
qr_code = fields.Char(string="QR Code URL",
compute="_compute_qr_code")
paired_internal_transfer_payment_id = fields.Many2one('account.payment',
help="When an internal transfer is posted, a paired payment is created. "
"They are cross referenced through this field", copy=False)
@@ -126,10 +123,11 @@ class AccountPayment(models.Model):
help="Invoices whose journal items have been reconciled with these payments.")
reconciled_invoices_count = fields.Integer(string="# Reconciled Invoices",
compute="_compute_stat_buttons_from_reconciliation")
# used to determine label 'invoice' or 'credit note' in view
reconciled_invoices_type = fields.Selection(
[('credit_note', 'Credit Note'), ('invoice', 'Invoice')],
compute='_compute_stat_buttons_from_reconciliation',
help="Technical field used to determine label 'invoice' or 'credit note' in view")
compute='_compute_stat_buttons_from_reconciliation')
reconciled_bill_ids = fields.Many2many('account.move', string="Reconciled Bills",
compute='_compute_stat_buttons_from_reconciliation',
help="Invoices whose journal items have been reconciled with these payments.")
@@ -143,14 +141,14 @@ class AccountPayment(models.Model):
# == Display purpose fields ==
payment_method_code = fields.Char(
related='payment_method_line_id.code',
help="Technical field used to adapt the interface to the payment type selected.")
related='payment_method_line_id.code')
# used to know whether the field `partner_bank_id` needs to be displayed or not in the payments form views
show_partner_bank_account = fields.Boolean(
compute='_compute_show_require_partner_bank',
help="Technical field used to know whether the field `partner_bank_id` needs to be displayed or not in the payments form views")
compute='_compute_show_require_partner_bank')
# used to know whether the field `partner_bank_id` needs to be required or not in the payments form views
require_partner_bank_account = fields.Boolean(
compute='_compute_show_require_partner_bank',
help="Technical field used to know whether the field `partner_bank_id` needs to be required or not in the payments form views")
compute='_compute_show_require_partner_bank')
country_code = fields.Char(related='company_id.account_fiscal_country_id.code')
amount_signed = fields.Monetary(
currency_field='currency_id', compute='_compute_amount_signed', tracking=True,
@@ -50,9 +50,10 @@ class AccountReconcileModelLine(models.Model):
account_id = fields.Many2one('account.account', string='Account', ondelete='cascade',
domain="[('deprecated', '=', False), ('company_id', '=', company_id), ('is_off_balance', '=', False)]",
required=True, check_company=True)
# This field is ignored in a bank statement reconciliation.
journal_id = fields.Many2one('account.journal', string='Journal', ondelete='cascade',
domain="[('type', '=', 'general'), ('company_id', '=', company_id)]",
help="This field is ignored in a bank statement reconciliation.", check_company=True)
domain="[('type', '=', 'general'), ('company_id', '=', company_id)]", check_company=True)
label = fields.Char(string='Journal Item Label')
amount_type = fields.Selection([
('fixed', 'Fixed'),
@@ -60,9 +61,12 @@ class AccountReconcileModelLine(models.Model):
('percentage_st_line', 'Percentage of statement line'),
('regex', 'From label'),
], required=True, default='percentage')
show_force_tax_included = fields.Boolean(compute='_compute_show_force_tax_included', help='Technical field used to show the force tax included button')
# used to show the force tax included button'
show_force_tax_included = fields.Boolean(compute='_compute_show_force_tax_included')
force_tax_included = fields.Boolean(string='Tax Included in Price', help='Force the tax to be managed as a price included tax.')
amount = fields.Float(string="Float Amount", compute='_compute_float_amount', store=True, help="Technical shortcut to parse the amount to a float")
# technical shortcut to parse the amount to a float
amount = fields.Float(string="Float Amount", compute='_compute_float_amount', store=True)
amount_string = fields.Char(string="Amount", default='100', required=True, help="""Value for the amount of the writeoff line
* Percentage: Percentage of the balance, between 0 and 100.
* Fixed: The fixed value of the writeoff. The amount will count as a debit if it is negative, as a credit if it is positive.
@@ -361,7 +365,8 @@ class AccountReconcileModel(models.Model):
tracking=True,
help="Every character that is nor a digit nor this separator will be removed from the matching string",
)
show_decimal_separator = fields.Boolean(compute='_compute_show_decimal_separator', help="Technical field to decide if we should show the decimal separator for the regex matching field.")
# used to decide if we should show the decimal separator for the regex matching field
show_decimal_separator = fields.Boolean(compute='_compute_show_decimal_separator')
number_entries = fields.Integer(string='Number of entries related to this model', compute='_compute_number_entries')
def action_reconcile_stat(self):
+6 -6
View File
@@ -43,12 +43,12 @@ class AccountFiscalPosition(models.Model):
# To be used in hiding the 'Federal States' field('attrs' in view side) when selected 'Country' has 0 states.
states_count = fields.Integer(compute='_compute_states_count')
foreign_vat = fields.Char(string="Foreign Tax ID", help="The tax ID of your company in the region mapped by this fiscal position.")
# Technical field used to display a banner on top of foreign vat fiscal positions,
# in order to ease the instantiation of foreign taxes when possible.
foreign_vat_header_mode = fields.Selection(
selection=[('templates_found', "Templates Found"), ('no_template', "No Template")],
compute='_compute_foreign_vat_header_mode',
help="Technical field used to display a banner on top of foreign vat fiscal positions, "
"in order to ease the instantiation of foreign taxes when possible."
)
compute='_compute_foreign_vat_header_mode')
def _compute_states_count(self):
for position in self:
@@ -461,7 +461,7 @@ class ResPartner(models.Model):
total_invoiced = fields.Monetary(compute='_invoice_total', string="Total Invoiced",
groups='account.group_account_invoice,account.group_account_readonly')
currency_id = fields.Many2one('res.currency', compute='_get_company_currency', readonly=True,
string="Currency", help='Utility field to express amount currency')
string="Currency") # currency of amount currency
journal_item_count = fields.Integer(compute='_compute_journal_item_count', string="Journal Items")
property_account_payable_id = fields.Many2one('account.account', company_dependent=True,
string="Account Payable",
@@ -505,9 +505,9 @@ class ResPartner(models.Model):
supplier_rank = fields.Integer(default=0, copy=False)
customer_rank = fields.Integer(default=0, copy=False)
# Technical field holding the amount partners that share the same account number as any set on this partner.
duplicated_bank_account_partners_count = fields.Integer(
compute='_compute_duplicated_bank_account_partners_count',
help='Technical field holding the amount partners that share the same account number as any set on this partner.',
)
def _compute_bank_count(self):
+1 -1
View File
@@ -9,7 +9,7 @@ class ResCurrency(models.Model):
_inherit = 'res.currency'
display_rounding_warning = fields.Boolean(string="Display Rounding Warning", compute='_compute_display_rounding_warning',
help="Technical field. Used to tell whether or not to display the rounding warning. The warning informs a rounding factor change might be dangerous on res.currency's form view.")
help="The warning informs a rounding factor change might be dangerous on res.currency's form view.")
@api.depends('rounding')
+1 -2
View File
@@ -6,8 +6,7 @@ from odoo import api, fields, models, _
class ResPartnerBank(models.Model):
_inherit = "res.partner.bank"
journal_id = fields.One2many('account.journal', 'bank_account_id', domain=[('type', '=', 'bank')], string='Account Journal', readonly=True,
help="The accounting journal corresponding to this bank account.")
journal_id = fields.One2many('account.journal', 'bank_account_id', domain=[('type', '=', 'bank')], string='Account Journal', readonly=True)
@api.constrains('journal_id')
def _check_journal_id(self):
@@ -18,7 +18,7 @@ class AccountInvoiceReport(models.Model):
company_id = fields.Many2one('res.company', string='Company', readonly=True)
company_currency_id = fields.Many2one('res.currency', string='Company Currency', readonly=True)
partner_id = fields.Many2one('res.partner', string='Partner', readonly=True)
commercial_partner_id = fields.Many2one('res.partner', string='Partner Company', help="Commercial Entity")
commercial_partner_id = fields.Many2one('res.partner', string='Main Partner')
country_id = fields.Many2one('res.country', string="Country")
invoice_user_id = fields.Many2one('res.users', string='Salesperson', readonly=True)
move_type = fields.Selection([
@@ -13,8 +13,8 @@ class AutomaticEntryWizard(models.TransientModel):
# General
action = fields.Selection([('change_period', 'Change Period'), ('change_account', 'Change Account')], required=True)
move_data = fields.Text(compute="_compute_move_data", help="JSON value of the moves to be created")
preview_move_data = fields.Text(compute="_compute_preview_move_data", help="JSON value of the data to be displayed in the previewer")
move_data = fields.Text(compute="_compute_move_data") # JSON value of the moves to be created
preview_move_data = fields.Text(compute="_compute_preview_move_data") # JSON value of the data to be displayed in the previewer
move_line_ids = fields.Many2many('account.move.line')
date = fields.Date(required=True, default=lambda self: fields.Date.context_today(self))
company_id = fields.Many2one('res.company', required=True, readonly=True)
@@ -46,8 +46,8 @@ class AutomaticEntryWizard(models.TransientModel):
# change account
destination_account_id = fields.Many2one(string="To", comodel_name='account.account', help="Account to transfer to.")
display_currency_helper = fields.Boolean(string="Currency Conversion Helper", compute='_compute_display_currency_helper',
help="Technical field. Used to indicate whether or not to display the currency conversion tooltip. The tooltip informs a currency conversion will be performed with the transfer.")
display_currency_helper = fields.Boolean(string="Currency Conversion Helper", compute='_compute_display_currency_helper')
# Technical field. Used to indicate whether or not to display the currency conversion tooltip. The tooltip informs a currency conversion will be performed with the transfer.
@api.depends('company_id')
def _compute_expense_accrual_account(self):
@@ -23,13 +23,12 @@ class AccountInvoiceSend(models.TransientModel):
domain="[('model', '=', 'account.move')]"
)
# View fields
# Technical field containing a textual representation of the selected move types,
# if multiple. It is used to inform the user in the window in such case.
move_types = fields.Char(
string='Move types',
compute='_compute_move_types',
readonly=True,
help='Technical field containing a textual representation of the selected move types, '
'if multiple. It is used to inform the user in the window in such case.')
readonly=True)
@api.model
def default_get(self, fields):
@@ -19,10 +19,9 @@ class AccountPaymentRegister(models.TransientModel):
compute='_compute_communication')
group_payment = fields.Boolean(string="Group Payments", store=True, readonly=False,
compute='_compute_group_payment',
help="Only one payment will be created by partner (bank)/ currency.")
help="Only one payment will be created by partner (bank), instead of one per billy.")
currency_id = fields.Many2one('res.currency', string='Currency', store=True, readonly=False,
compute='_compute_currency_id',
help="The payment's currency.")
compute='_compute_currency_id')
journal_id = fields.Many2one('account.journal', store=True, readonly=False,
compute='_compute_journal_id',
domain="[('id', 'in', available_journal_ids)]")
@@ -68,14 +67,11 @@ class AccountPaymentRegister(models.TransientModel):
compute='_compute_from_lines')
source_currency_id = fields.Many2one('res.currency',
string='Source Currency', store=True, copy=False,
compute='_compute_from_lines',
help="The payment's currency.")
compute='_compute_from_lines')
can_edit_wizard = fields.Boolean(store=True, copy=False,
compute='_compute_from_lines',
help="Technical field used to indicate the user can edit the wizard content such as the amount.")
compute='_compute_from_lines') # used to check if user can edit info such as the amount
can_group_payments = fields.Boolean(store=True, copy=False,
compute='_compute_from_lines',
help="Technical field used to indicate the user can see the 'group_payments' box.")
compute='_compute_from_lines') # can the user see the 'group_payments' box
company_id = fields.Many2one('res.company', store=True, copy=False,
compute='_compute_from_lines')
partner_id = fields.Many2one('res.partner',
@@ -109,11 +105,9 @@ class AccountPaymentRegister(models.TransientModel):
# == Display purpose fields ==
show_partner_bank_account = fields.Boolean(
compute='_compute_show_require_partner_bank',
help="Technical field used to know whether the field `partner_bank_id` needs to be displayed or not in the payments form views")
compute='_compute_show_require_partner_bank') # Used to know whether the field `partner_bank_id` should be displayed
require_partner_bank_account = fields.Boolean(
compute='_compute_show_require_partner_bank',
help="Technical field used to know whether the field `partner_bank_id` needs to be required or not in the payments form views")
compute='_compute_show_require_partner_bank') # used to know whether the field `partner_bank_id` should be required
country_code = fields.Char(related='company_id.account_fiscal_country_id.code', readonly=True)
# -------------------------------------------------------------------------
+2 -2
View File
@@ -27,9 +27,9 @@ class AccountMove(models.Model):
compute='_compute_edi_error_message')
edi_error_message = fields.Html(
compute='_compute_edi_error_message')
# Technical field to display the documents that will be processed by the CRON
edi_web_services_to_process = fields.Text(
compute='_compute_edi_web_services_to_process',
help="Technical field to display the documents that will be processed by the CRON")
compute='_compute_edi_web_services_to_process')
edi_show_cancel_button = fields.Boolean(
compute='_compute_edi_show_cancel_button')
edi_show_abandon_cancel_button = fields.Boolean(
+2 -2
View File
@@ -34,8 +34,8 @@ class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
vehicle_id = fields.Many2one('fleet.vehicle', string='Vehicle', index='btree_not_null')
need_vehicle = fields.Boolean(compute='_compute_need_vehicle',
help="Technical field to decide whether the vehicle_id field is editable")
# used to decide whether the vehicle_id field is editable
need_vehicle = fields.Boolean(compute='_compute_need_vehicle')
def _compute_need_vehicle(self):
self.need_vehicle = False
+1 -2
View File
@@ -19,8 +19,7 @@ class Alarm(models.Model):
list(_interval_selection.items()), 'Unit', required=True, default='hours')
duration_minutes = fields.Integer(
'Duration in minutes', store=True,
search='_search_duration_minutes', compute='_compute_duration_minutes',
help="Duration in minutes")
search='_search_duration_minutes', compute='_compute_duration_minutes')
mail_template_id = fields.Many2one(
'mail.template', string="Email Template",
domain=[('model', 'in', ['calendar.attendee'])],
+3 -4
View File
@@ -34,14 +34,13 @@ class Attendee(models.Model):
recurrence_id = fields.Many2one('calendar.recurrence', related='event_id.recurrence_id')
# attendee
partner_id = fields.Many2one('res.partner', 'Attendee', required=True, readonly=True)
email = fields.Char('Email', related='partner_id.email', help="Email of Invited Person")
phone = fields.Char('Phone', related='partner_id.phone', help="Phone number of Invited Person")
email = fields.Char('Email', related='partner_id.email')
phone = fields.Char('Phone', related='partner_id.phone')
common_name = fields.Char('Common name', compute='_compute_common_name', store=True)
access_token = fields.Char('Invitation Token', default=_default_access_token)
mail_tz = fields.Selection(_tz_get, compute='_compute_mail_tz', help='Timezone used for displaying time in the mail template')
# state
state = fields.Selection(STATE_SELECTION, string='Status', readonly=True, default='needsAction',
help="Status of the attendee's participation")
state = fields.Selection(STATE_SELECTION, string='Status', readonly=True, default='needsAction')
availability = fields.Selection(
[('free', 'Available'), ('busy', 'Busy')], 'Available/Busy', readonly=True)
+1 -1
View File
@@ -100,7 +100,7 @@ class Meeting(models.Model):
user_id = fields.Many2one('res.users', 'Organizer', default=lambda self: self.env.user)
partner_id = fields.Many2one(
'res.partner', string='Scheduled by', related='user_id.partner_id', readonly=True)
location = fields.Char('Location', tracking=True, help="Location of Event")
location = fields.Char('Location', tracking=True)
videocall_location = fields.Char('Meeting URL', compute='_compute_videocall_location', store=True, copy=True)
access_token = fields.Char('Invitation Token', store=True, copy=False, index=True)
videocall_source = fields.Selection([('discuss', 'Discuss'), ('custom', 'Custom')], compute='_compute_videocall_source')
+1 -2
View File
@@ -11,8 +11,7 @@ class Contacts(models.Model):
user_id = fields.Many2one('res.users', 'Me', required=True, default=lambda self: self.env.user, index=True)
partner_id = fields.Many2one('res.partner', 'Employee', required=True, index=True)
active = fields.Boolean('Active', default=True)
partner_checked = fields.Boolean('Checked', default=True,
help="This field is used to know if the partner is checked in the filter of the calendar view for the user_id.")
partner_checked = fields.Boolean('Checked', default=True) # used to know if the partner is checked in the filter of the calendar view for the user_id.
_sql_constraints = [
('user_id_partner_id_unique', 'UNIQUE(user_id, partner_id)', 'A user cannot have the same contact twice.')
+1 -2
View File
@@ -11,8 +11,7 @@ class CrmLeadLost(models.TransientModel):
lost_reason_id = fields.Many2one('crm.lost.reason', 'Lost Reason')
lost_feedback = fields.Html(
'Closing Note', sanitize=True,
help="Closing note logged in leads discussion history."
'Closing Note', sanitize=True
)
def action_lost_reason_apply(self):
@@ -11,8 +11,7 @@ class CrmIapLeadIndustry(models.Model):
_order = 'sequence,id'
name = fields.Char(string='Industry', required=True, translate=True)
reveal_ids = fields.Char(required=True,
help="The list of reveal_ids for this industry, separated with ','")
reveal_ids = fields.Char(required=True) # The list of reveal_ids for this industry, separated with ','
color = fields.Integer(string='Color Index')
sequence = fields.Integer('Sequence')
@@ -61,8 +61,7 @@ class CRMLeadMiningRequest(models.Model):
company_size_max = fields.Integer(default=1000)
country_ids = fields.Many2many('res.country', string='Countries', default=_default_country_ids)
state_ids = fields.Many2many('res.country.state', string='States')
available_state_ids = fields.One2many('res.country.state', compute='_compute_available_state_ids',
help="List of available states based on selected countries")
available_state_ids = fields.One2many('res.country.state', compute='_compute_available_state_ids')
industry_ids = fields.Many2many('crm.iap.lead.industry', string='Industries')
# Contact Generation Filter
@@ -14,7 +14,6 @@ class ChooseDeliveryCarrier(models.TransientModel):
carrier_id = fields.Many2one(
'delivery.carrier',
string="Shipping Method",
help="Choose the method to deliver your goods",
required=True,
)
delivery_type = fields.Selection(related='carrier_id.delivery_type')
+1 -2
View File
@@ -8,8 +8,7 @@ class ResPartner(models.Model):
_inherit = 'res.partner'
event_count = fields.Integer(
'# Events', compute='_compute_event_count', groups='event.group_event_registration_desk',
help='Number of events the partner has participated.')
'# Events', compute='_compute_event_count', groups='event.group_event_registration_desk')
def _compute_event_count(self):
self.event_count = 0
+1 -2
View File
@@ -27,8 +27,7 @@ class EventBooth(models.Model):
state = fields.Selection(
[('available', 'Available'), ('unavailable', 'Unavailable')],
string='Status', group_expand='_group_expand_states',
default='available', required=True, tracking=True,
help='Shows the availability of a Booth')
default='available', required=True, tracking=True)
is_available = fields.Boolean(compute='_compute_is_available', search='_search_is_available')
@api.depends('partner_id')
+1 -2
View File
@@ -12,8 +12,7 @@ class EventEvent(models.Model):
'crm.lead', 'event_id', string="Leads", groups='sales_team.group_sale_salesman',
help="Leads generated from this event")
lead_count = fields.Integer(
string="# Leads", compute='_compute_lead_count', groups='sales_team.group_sale_salesman',
help="Counter for the leads linked to this event")
string="# Leads", compute='_compute_lead_count', groups='sales_team.group_sale_salesman')
@api.depends('lead_ids')
def _compute_lead_count(self):
@@ -11,11 +11,9 @@ class EventRegistration(models.Model):
lead_ids = fields.Many2many(
'crm.lead', string='Leads', copy=False, readonly=True,
groups='sales_team.group_sale_salesman',
help="Leads generated from the registration.")
groups='sales_team.group_sale_salesman')
lead_count = fields.Integer(
'# Leads', compute='_compute_lead_count', compute_sudo=True,
help="Counter for the leads linked to this registration")
'# Leads', compute='_compute_lead_count', compute_sudo=True)
@api.depends('lead_ids')
def _compute_lead_count(self):
+8 -8
View File
@@ -29,7 +29,7 @@ class FleetVehicle(models.Model):
return state if state and state.id else False
name = fields.Char(compute="_compute_vehicle_name", store=True)
description = fields.Html("Vehicle Description", help="Add a note about this vehicle")
description = fields.Html("Vehicle Description")
active = fields.Boolean('Active', default=True, tracking=True)
manager_id = fields.Many2one(
'res.users', 'Fleet Manager',
@@ -49,7 +49,7 @@ class FleetVehicle(models.Model):
driver_id = fields.Many2one('res.partner', 'Driver', tracking=True, help='Driver address of the vehicle', copy=False)
future_driver_id = fields.Many2one('res.partner', 'Future Driver', tracking=True, help='Next Driver Address of the vehicle', copy=False, domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]")
model_id = fields.Many2one('fleet.vehicle.model', 'Model',
tracking=True, required=True, help='Model of the vehicle')
tracking=True, required=True)
brand_id = fields.Many2one('fleet.vehicle.model.brand', 'Brand', related="model_id.brand_id", store=True, readonly=False)
log_drivers = fields.One2many('fleet.vehicle.assignation.log', 'vehicle_id', string='Assignment Logs')
@@ -79,11 +79,11 @@ class FleetVehicle(models.Model):
odometer_unit = fields.Selection([
('kilometers', 'km'),
('miles', 'mi')
], 'Odometer Unit', default='kilometers', help='Unit of the odometer ', required=True)
], 'Odometer Unit', default='kilometers', required=True)
transmission = fields.Selection(
[('manual', 'Manual'), ('automatic', 'Automatic')], 'Transmission', help='Transmission Used by the vehicle',
[('manual', 'Manual'), ('automatic', 'Automatic')], 'Transmission',
compute='_compute_model_fields', store=True, readonly=False)
fuel_type = fields.Selection(FUEL_TYPES, 'Fuel Type', help='Fuel Used by the vehicle', compute='_compute_model_fields', store=True, readonly=False)
fuel_type = fields.Selection(FUEL_TYPES, 'Fuel Type', compute='_compute_model_fields', store=True, readonly=False)
horsepower = fields.Integer(compute='_compute_model_fields', store=True, readonly=False)
horsepower_tax = fields.Float('Horsepower Taxation', compute='_compute_model_fields', store=True, readonly=False)
power = fields.Integer('Power', help='Power in kW of the vehicle', compute='_compute_model_fields', store=True, readonly=False)
@@ -103,13 +103,13 @@ class FleetVehicle(models.Model):
('expired', 'Expired'),
('closed', 'Closed')
], string='Last Contract State', compute='_compute_contract_reminder', required=False)
car_value = fields.Float(string="Catalog Value (VAT Incl.)", help='Value of the bought vehicle')
net_car_value = fields.Float(string="Purchase Value", help="Purchase value of the vehicle")
car_value = fields.Float(string="Catalog Value (VAT Incl.)")
net_car_value = fields.Float(string="Purchase Value")
residual_value = fields.Float()
plan_to_change_car = fields.Boolean(related='driver_id.plan_to_change_car', store=True, readonly=False)
plan_to_change_bike = fields.Boolean(related='driver_id.plan_to_change_bike', store=True, readonly=False)
vehicle_type = fields.Selection(related='model_id.vehicle_type')
frame_type = fields.Selection([('diamant', 'Diamant'), ('trapez', 'Trapez'), ('wave', 'Wave')], help="Frame type of the bike")
frame_type = fields.Selection([('diamant', 'Diamant'), ('trapez', 'Trapez'), ('wave', 'Wave')], string="Bike Frame Type")
electric_assistance = fields.Boolean(compute='_compute_model_fields', store=True, readonly=False)
frame_size = fields.Float()
service_activity = fields.Selection([
@@ -17,7 +17,7 @@ class FleetVehicleLogContract(models.Model):
start_date = fields.Date.from_string(strdate)
return fields.Date.to_string(start_date + oneyear)
vehicle_id = fields.Many2one('fleet.vehicle', 'Vehicle', required=True, help='Vehicle concerned by this log', check_company=True)
vehicle_id = fields.Many2one('fleet.vehicle', 'Vehicle', required=True, check_company=True)
cost_subtype_id = fields.Many2one('fleet.service.type', 'Type', help='Cost type purchased with this cost', domain=[('category', '=', 'contract')])
amount = fields.Monetary('Cost', tracking=True)
date = fields.Date(help='Date when the cost has been executed')
@@ -55,7 +55,7 @@ class FleetVehicleLogContract(models.Model):
('weekly', 'Weekly'),
('monthly', 'Monthly'),
('yearly', 'Yearly')
], 'Recurring Cost Frequency', default='monthly', help='Frequency of the recurring cost', required=True)
], 'Recurring Cost Frequency', default='monthly', required=True)
service_ids = fields.Many2many('fleet.service.type', string="Included Services")
@api.depends('vehicle_id.name', 'cost_subtype_id')
@@ -12,7 +12,7 @@ class FleetVehicleLogServices(models.Model):
_description = 'Services for vehicles'
active = fields.Boolean(default=True)
vehicle_id = fields.Many2one('fleet.vehicle', 'Vehicle', required=True, help='Vehicle concerned by this log')
vehicle_id = fields.Many2one('fleet.vehicle', 'Vehicle', required=True)
manager_id = fields.Many2one('res.users', 'Fleet Manager', related='vehicle_id.manager_id', store=True)
amount = fields.Monetary('Cost')
description = fields.Char('Description')
+2 -2
View File
@@ -22,13 +22,13 @@ class FleetVehicleModel(models.Model):
_order = 'name asc'
name = fields.Char('Model name', required=True)
brand_id = fields.Many2one('fleet.vehicle.model.brand', 'Manufacturer', required=True, help='Manufacturer of the vehicle')
brand_id = fields.Many2one('fleet.vehicle.model.brand', 'Manufacturer', required=True)
category_id = fields.Many2one('fleet.vehicle.model.category', 'Category')
vendors = fields.Many2many('res.partner', 'fleet_vehicle_model_vendors', 'model_id', 'partner_id', string='Vendors')
image_128 = fields.Image(related='brand_id.image_128', readonly=True)
active = fields.Boolean(default=True)
vehicle_type = fields.Selection([('car', 'Car'), ('bike', 'Bike')], default='car', required=True)
transmission = fields.Selection([('manual', 'Manual'), ('automatic', 'Automatic')], 'Transmission', help='Transmission Used by the vehicle')
transmission = fields.Selection([('manual', 'Manual'), ('automatic', 'Automatic')], 'Transmission')
vehicle_count = fields.Integer(compute='_compute_vehicle_count')
model_year = fields.Integer()
color = fields.Char()
+1 -1
View File
@@ -10,6 +10,6 @@ class FleetVehicleState(models.Model):
_description = 'Vehicle Status'
name = fields.Char(required=True, translate=True)
sequence = fields.Integer(help="Used to order the note stages")
sequence = fields.Integer()
_sql_constraints = [('fleet_state_name_unique', 'unique(name)', 'State name already exists')]
@@ -13,9 +13,9 @@ class BadgeUser(models.Model):
_rec_name = "badge_name"
user_id = fields.Many2one('res.users', string="User", required=True, ondelete="cascade", index=True)
sender_id = fields.Many2one('res.users', string="Sender", help="The user who has send the badge")
sender_id = fields.Many2one('res.users', string="Sender")
badge_id = fields.Many2one('gamification.badge', string='Badge', required=True, ondelete="cascade", index=True)
challenge_id = fields.Many2one('gamification.challenge', string='Challenge originating', help="If this badge was rewarded through a challenge")
challenge_id = fields.Many2one('gamification.challenge', string='Challenge')
comment = fields.Text('Comment')
badge_name = fields.Char(related='badge_id.name', string="Badge Name", readonly=False)
level = fields.Selection(
@@ -71,10 +71,10 @@ class Challenge(models.Model):
string="State", required=True, tracking=True)
manager_id = fields.Many2one(
'res.users', default=lambda self: self.env.uid,
string="Responsible", help="The user responsible for the challenge.",)
string="Responsible")
# members
user_ids = fields.Many2many('res.users', 'gamification_challenge_users_rel', string="Users", help="List of users participating to the challenge")
user_domain = fields.Char("User domain", help="Alternative to a list of users")
user_ids = fields.Many2many('res.users', 'gamification_challenge_users_rel', string="Participants")
user_domain = fields.Char("User domain") # Alternative to a list of users
user_count = fields.Integer('# Users', compute='_compute_user_count')
# periodicity
period = fields.Selection([
@@ -18,7 +18,7 @@ class ChallengeLine(models.Model):
challenge_id = fields.Many2one('gamification.challenge', string='Challenge', required=True, ondelete="cascade")
definition_id = fields.Many2one('gamification.goal.definition', string='Goal Definition', required=True, ondelete="cascade")
sequence = fields.Integer('Sequence', help='Sequence number for ordering', default=1)
sequence = fields.Integer('Sequence', default=1)
target_goal = fields.Float('Target Value to Reach', required=True)
name = fields.Char("Name", related='definition_id.name', readonly=False)
@@ -42,7 +42,7 @@ class Goal(models.Model):
('canceled', "Canceled"),
], default='draft', string='State', required=True)
to_update = fields.Boolean('To update')
closed = fields.Boolean('Closed goal', help="These goals will not be recomputed.")
closed = fields.Boolean('Closed goal')
computation_mode = fields.Selection(related='definition_id.computation_mode', readonly=False)
remind_update_delay = fields.Integer(
@@ -33,10 +33,10 @@ class GoalDefinition(models.Model):
('progress', "Progressive (using numerical values)"),
('boolean', "Exclusive (done or not-done)"),
], default='progress', string="Displayed as", required=True)
model_id = fields.Many2one('ir.model', string='Model', help='The model object for the field to evaluate')
model_id = fields.Many2one('ir.model', string='Model')
model_inherited_ids = fields.Many2many('ir.model', related='model_id.inherited_model_ids')
field_id = fields.Many2one(
'ir.model.fields', string='Field to Sum', help='The field containing the value to evaluate',
'ir.model.fields', string='Field to Sum',
domain=DOMAIN_TEMPLATE % ''
)
field_date_id = fields.Many2one(
@@ -14,11 +14,10 @@ class KarmaRank(models.Model):
description = fields.Html(string='Description', translate=html_translate, sanitize_attributes=False,)
description_motivational = fields.Html(
string='Motivational', translate=html_translate, sanitize_attributes=False,
help="Motivational phrase to reach this rank")
help="Motivational phrase to reach this rank on your profile page")
karma_min = fields.Integer(
string='Required Karma', required=True, default=1,
help='Minimum karma needed to reach this rank')
user_ids = fields.One2many('res.users', 'rank_id', string='Users', help="Users having this rank")
string='Required Karma', required=True, default=1)
user_ids = fields.One2many('res.users', 'rank_id', string='Users')
rank_users_count = fields.Integer("# Users", compute="_compute_rank_users_count")
_sql_constraints = [
+1 -1
View File
@@ -78,7 +78,7 @@ class HrEmployeePrivate(models.Model):
domain="[('partner_id', '=', address_home_id), '|', ('company_id', '=', False), ('company_id', '=', company_id)]",
groups="hr.group_hr_user",
tracking=True,
help='Employee bank salary account')
help='Employee bank account to pay salaries')
permit_no = fields.Char('Work Permit No', groups="hr.group_hr_user", tracking=True)
visa_no = fields.Char('Visa No', groups="hr.group_hr_user", tracking=True)
visa_expire = fields.Date('Visa Expire Date', groups="hr.group_hr_user", tracking=True)
+1 -2
View File
@@ -12,8 +12,7 @@ class HrEmployee(models.Model):
_inherit = "hr.employee"
attendance_ids = fields.One2many(
'hr.attendance', 'employee_id', groups="hr_attendance.group_hr_attendance_user",
help='list of attendances for the employee')
'hr.attendance', 'employee_id', groups="hr_attendance.group_hr_attendance_user")
last_attendance_id = fields.Many2one(
'hr.attendance', compute='_compute_last_attendance_id', store=True,
groups="hr_attendance.group_hr_attendance_kiosk,hr_attendance.group_hr_attendance")
+1 -2
View File
@@ -23,8 +23,7 @@ class Contract(models.Model):
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", string="Department")
job_id = fields.Many2one('hr.job', compute='_compute_employee_contract', store=True, readonly=False,
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", string='Job Position')
date_start = fields.Date('Start Date', required=True, default=fields.Date.today, tracking=True,
help="Start date of the contract.", index=True)
date_start = fields.Date('Start Date', required=True, default=fields.Date.today, tracking=True, index=True)
date_end = fields.Date('End Date', tracking=True,
help="End date of the contract (if it's a fixed-term contract).")
trial_date_end = fields.Date('End of Trial Period',
@@ -7,7 +7,7 @@ from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
expense_id = fields.Many2one('hr.expense', string='Expense', copy=False, help="Expense where the move line come from")
expense_id = fields.Many2one('hr.expense', string='Expense', copy=False)
def reconcile(self):
# OVERRIDE
+2 -2
View File
@@ -103,7 +103,7 @@ class HrExpense(models.Model):
('approved', 'Approved'),
('done', 'Paid'),
('refused', 'Refused')
], compute='_compute_state', string='Status', copy=False, index=True, readonly=True, store=True, default='draft', help="Status of the expense.")
], compute='_compute_state', string='Status', copy=False, index=True, readonly=True, store=True, default='draft')
sheet_id = fields.Many2one('hr.expense.sheet', string="Expense Report", domain="[('employee_id', '=', employee_id), ('company_id', '=', company_id)]", readonly=True, copy=False)
sheet_is_editable = fields.Boolean(compute='_compute_sheet_is_editable')
approved_by = fields.Many2one('res.users', string='Approved By', related='sheet_id.user_id')
@@ -980,7 +980,7 @@ class HrExpenseSheet(models.Model):
('post', 'Posted'),
('done', 'Done'),
('cancel', 'Refused')
], string='Status', index=True, readonly=True, tracking=True, copy=False, default='draft', required=True, help='Expense Report State')
], string='Status', index=True, readonly=True, tracking=True, copy=False, default='draft', required=True)
payment_state = fields.Selection(selection=PAYMENT_STATE_SELECTION, string="Payment Status",
store=True, readonly=True, copy=False, tracking=True, compute='_compute_payment_state')
employee_id = fields.Many2one('hr.employee', string="Employee", required=True, readonly=True, tracking=True, states={'draft': [('readonly', False)]}, default=_default_employee_id, check_company=True, domain= lambda self: self.env['hr.expense']._get_employee_id_domain())
@@ -7,8 +7,7 @@ from odoo import api, fields, models
class HrDepartureWizard(models.TransientModel):
_inherit = 'hr.departure.wizard'
release_campany_car = fields.Boolean("Release Company Car", default=True,
help="Release the company car.")
release_campany_car = fields.Boolean("Release Company Car", default=True)
def action_register_departure(self):
super(HrDepartureWizard, self).action_register_departure()
@@ -67,8 +67,7 @@ class RecruitmentStage(models.Model):
name = fields.Char("Stage Name", required=True, translate=True)
sequence = fields.Integer(
"Sequence", default=10,
help="Gives the sequence order when displaying a list of stages.")
"Sequence", default=10)
job_ids = fields.Many2many(
'hr.job', string='Job Specific',
help='Specific jobs that uses this stage. Other jobs will not use this stage.')
@@ -115,7 +114,7 @@ class RecruitmentDegree(models.Model):
]
name = fields.Char("Degree Name", required=True, translate=True)
sequence = fields.Integer("Sequence", default=1, help="Gives the sequence order when displaying a list of degrees.")
sequence = fields.Integer("Sequence", default=1)
class Applicant(models.Model):
+2 -1
View File
@@ -15,4 +15,5 @@ class Uom(models.Model):
"product_uom_dozen",
]
timesheet_widget = fields.Char("Widget", help="Widget used in the webclient when this unit is the one used to encode timesheets.")
# widget used in the webclient when this unit is the one used to encode timesheets.
timesheet_widget = fields.Char("Widget")
@@ -83,4 +83,4 @@ class HrWorkEntryType(models.Model):
leave_type_ids = fields.One2many(
'hr.leave.type', 'work_entry_type_id', string='Time Off Type',
help="Every new time off type in this list will be reported as select work entry in payslip.")
help="Work entry used in the payslip.")
+1 -1
View File
@@ -7,7 +7,7 @@ from odoo import fields, models
class Lead(models.Model):
_inherit = 'crm.lead'
reveal_id = fields.Char(string='Reveal ID', help="Technical ID of reveal request done by IAP.")
reveal_id = fields.Char(string='Reveal ID') # Technical ID of reveal request done by IAP
def _merge_get_fields(self):
return super(Lead, self)._merge_get_fields() + ['reveal_id']
+1 -1
View File
@@ -11,7 +11,7 @@ class Digest(models.Model):
kpi_livechat_rating_value = fields.Float(digits=(16, 2), compute='_compute_kpi_livechat_rating_value')
kpi_livechat_conversations = fields.Boolean('Conversations handled')
kpi_livechat_conversations_value = fields.Integer(compute='_compute_kpi_livechat_conversations_value')
kpi_livechat_response = fields.Boolean('Time to answer (sec)', help="Time to answer the user in second.")
kpi_livechat_response = fields.Boolean('Time to answer (sec)')
kpi_livechat_response_value = fields.Float(compute='_compute_kpi_livechat_response_value')
def _compute_kpi_livechat_rating_value(self):
@@ -27,7 +27,7 @@ class ImLivechatChannel(models.Model):
return [(6, 0, [self._uid])]
# attribute fields
name = fields.Char('Name', required=True, help="The name of the channel")
name = fields.Char('Channel Name', required=True)
button_text = fields.Char('Text of the Button', default='Have a Question? Chat with us.',
help="Default text displayed on the Livechat Support Button")
default_message = fields.Char('Welcome Message', default='How may I help you?',
+2 -2
View File
@@ -18,9 +18,9 @@ class MailChannel(models.Model):
anonymous_name = fields.Char('Anonymous Name')
channel_type = fields.Selection(selection_add=[('livechat', 'Livechat Conversation')], ondelete={'livechat': 'cascade'})
livechat_active = fields.Boolean('Is livechat ongoing?', help='Livechat session is active until visitor leave the conversation.')
livechat_active = fields.Boolean('Is livechat ongoing?', help='Livechat session is active until visitor leaves the conversation.')
livechat_channel_id = fields.Many2one('im_livechat.channel', 'Channel')
livechat_operator_id = fields.Many2one('res.partner', string='Operator', help="""Operator for this specific channel""")
livechat_operator_id = fields.Many2one('res.partner', string='Operator')
chatbot_current_step_id = fields.Many2one('chatbot.script.step', string='Chatbot Current Step')
chatbot_message_ids = fields.One2many('chatbot.message', 'mail_channel_id', string='Chatbot Messages')
country_id = fields.Many2one('res.country', string="Country", help="Country of the visitor of the channel")
@@ -17,9 +17,9 @@ class ImLivechatReportChannel(models.Model):
channel_name = fields.Char('Channel Name', readonly=True)
technical_name = fields.Char('Code', readonly=True)
livechat_channel_id = fields.Many2one('im_livechat.channel', 'Channel', readonly=True)
start_date = fields.Datetime('Start Date of session', readonly=True, help="Start date of the conversation")
start_hour = fields.Char('Start Hour of session', readonly=True, help="Start hour of the conversation")
day_number = fields.Char('Day Number', readonly=True, help="Day number of the session (1 is Monday, 7 is Sunday)")
start_date = fields.Datetime('Start Date of session', readonly=True)
start_hour = fields.Char('Start Hour of session', readonly=True)
day_number = fields.Char('Day Number', readonly=True, help="1 is Monday, 7 is Sunday")
time_to_answer = fields.Float('Time to answer (sec)', digits=(16, 2), readonly=True, group_operator="avg", help="Average time in seconds to give the first answer to the visitor")
start_date_hour = fields.Char('Hour of start Date of session', readonly=True)
duration = fields.Float('Average duration', digits=(16, 2), readonly=True, group_operator="avg", help="Duration of the conversation (in seconds)")
@@ -14,9 +14,9 @@ class ImLivechatReportOperator(models.Model):
partner_id = fields.Many2one('res.partner', 'Operator', readonly=True)
livechat_channel_id = fields.Many2one('im_livechat.channel', 'Channel', readonly=True)
nbr_channel = fields.Integer('# of Sessions', readonly=True, group_operator="sum", help="Number of conversation")
nbr_channel = fields.Integer('# of Sessions', readonly=True, group_operator="sum")
channel_id = fields.Many2one('mail.channel', 'Conversation', readonly=True)
start_date = fields.Datetime('Start Date of session', readonly=True, help="Start date of the conversation")
start_date = fields.Datetime('Start Date of session', readonly=True)
time_to_answer = fields.Float('Time to answer', digits=(16, 2), readonly=True, group_operator="avg", help="Average time to give the first answer to the visitor")
duration = fields.Float('Average duration', digits=(16, 2), readonly=True, group_operator="avg", help="Duration of the conversation (in seconds)")
@@ -12,10 +12,10 @@ class AccountMove(models.Model):
compute='_compute_l10n_es_edi_is_required'
)
l10n_es_edi_csv = fields.Char(string="CSV return code", copy=False)
# Technical field to keep the date the invoice was sent the first time as
# the date the invoice was registered into the system.
l10n_es_registration_date = fields.Date(
string="Registration Date", copy=False,
help="Technical field to keep the date the invoice was sent the first time as the date the invoice was "
"registered into the system.",
)
# -------------------------------------------------------------------------
@@ -33,7 +33,7 @@ class L10nInAccountInvoiceReport(models.Model):
cess_amount = fields.Float(string="Cess Amount")
price_total = fields.Float(string='Total Without Tax')
total = fields.Float(string="Invoice Total")
reversed_entry_id = fields.Many2one('account.move', string="Refund Invoice", help="From where this Refund is created")
reversed_entry_id = fields.Many2one('account.move', string="Refunded Invoice")
shipping_bill_number = fields.Char(string="Shipping Bill Number")
shipping_bill_date = fields.Date(string="Shipping Bill Date")
shipping_port_code_id = fields.Many2one('l10n_in.port.code', string='Shipping port code')
+5 -1
View File
@@ -51,7 +51,11 @@ class AccountChartTemplate(models.Model):
_order = 'name'
name = fields.Char(translate=True)
spoken_languages = fields.Char(string='Spoken Languages', help="State here the languages for which the translations of templates could be loaded at the time of installation of this localization module and copied in the final object when generating them from templates. You must provide the language codes separated by ';'")
spoken_languages = fields.Char(string='Spoken Languages')
# the languages for which the translations of templates could be loaded at
# the time of installation of this localization module and copied in the
# final object when generating them from templates. You must provide the
# language codes separated by ';'
class AccountFiscalPosition(models.Model):
+1 -1
View File
@@ -15,7 +15,7 @@ class LunchTopping(models.Model):
currency_id = fields.Many2one('res.currency', related='company_id.currency_id')
price = fields.Monetary('Price', required=True)
supplier_id = fields.Many2one('lunch.supplier', ondelete='cascade')
topping_category = fields.Integer('Topping Category', help="This field is a technical field", required=True, default=1)
topping_category = fields.Integer('Topping Category', required=True, default=1)
def name_get(self):
currency_id = self.env.company.currency_id
+1 -1
View File
@@ -43,7 +43,7 @@ class ServerActions(models.Model):
('generic', 'Generic User From Record')], default="specific",
help="Use 'Specific User' to always assign the same user on the next activity. Use 'Generic User From Record' to specify the field name of the user to choose on the record.")
activity_user_id = fields.Many2one('res.users', string='Responsible')
activity_user_field_name = fields.Char('User field name', help="Technical name of the user on the record", default="user_id")
activity_user_field_name = fields.Char('User field name', default="user_id")
@api.onchange('activity_date_deadline_range')
def _onchange_activity_date_deadline_range(self):
+3 -6
View File
@@ -10,16 +10,13 @@ class IrModel(models.Model):
_order = 'is_mail_thread DESC, name ASC'
is_mail_thread = fields.Boolean(
string="Mail Thread", default=False,
help="Whether this model supports messages and notifications.",
string="Has Mail Thread", default=False,
)
is_mail_activity = fields.Boolean(
string="Mail Activity", default=False,
help="Whether this model supports activities.",
string="Has Mail Activity", default=False,
)
is_mail_blacklist = fields.Boolean(
string="Mail Blacklist", default=False,
help="Whether this model supports blacklist.",
string="Has Mail Blacklist", default=False,
)
def unlink(self):
+3 -4
View File
@@ -58,7 +58,7 @@ class MailActivity(models.Model):
res_id = fields.Many2oneReference(string='Related Document ID', index=True, model_field='res_model')
res_name = fields.Char(
'Document Name', compute='_compute_res_name', compute_sudo=True, store=True,
help="Display name of the related document.", readonly=True)
readonly=True)
# activity
activity_type_id = fields.Many2one(
'mail.activity.type', string='Activity Type',
@@ -88,12 +88,11 @@ class MailActivity(models.Model):
previous_activity_type_id = fields.Many2one('mail.activity.type', string='Previous Activity Type', readonly=True)
has_recommended_activities = fields.Boolean(
'Next activities available',
compute='_compute_has_recommended_activities',
help='Technical field for UX purpose')
compute='_compute_has_recommended_activities') # technical field for UX purpose
mail_template_ids = fields.Many2many(related='activity_type_id.mail_template_ids', readonly=True)
chaining_type = fields.Selection(related='activity_type_id.chaining_type', readonly=True)
# access
can_write = fields.Boolean(compute='_compute_can_write', help='Technical field to hide buttons if the current user has no access.')
can_write = fields.Boolean(compute='_compute_can_write') # used to hide buttons if the current user has no access
_sql_constraints = [
# Required on a Many2one reference field is not sufficient as actually
+1 -1
View File
@@ -75,7 +75,7 @@ class MailActivityType(models.Model):
#Fields for display purpose only
initial_res_model = fields.Selection(selection=_get_model_selection, string='Initial model', compute="_compute_initial_res_model", store=False,
help='Technical field to keep track of the model at the start of editing to support UX related behaviour')
res_model_change = fields.Boolean(string="Model has change", help="Technical field for UX related behaviour", default=False, store=False)
res_model_change = fields.Boolean(string="Model has change", default=False, store=False)
@api.onchange('res_model')
def _onchange_res_model(self):
+1 -1
View File
@@ -23,7 +23,7 @@ class ChannelMember(models.Model):
custom_channel_name = fields.Char('Custom channel name')
fetched_message_id = fields.Many2one('mail.message', string='Last Fetched')
seen_message_id = fields.Many2one('mail.message', string='Last Seen')
message_unread_counter = fields.Integer('Unread Messages Counter', compute='_compute_message_unread', compute_sudo=True, help='Number of unread messages')
message_unread_counter = fields.Integer('Unread Messages Counter', compute='_compute_message_unread', compute_sudo=True)
fold_state = fields.Selection([('open', 'Open'), ('folded', 'Folded'), ('closed', 'Closed')], string='Conversation Fold State', default='open')
is_minimized = fields.Boolean("Conversation is minimized")
is_pinned = fields.Boolean("Is pinned on the interface", default=True)
+6 -10
View File
@@ -92,20 +92,18 @@ class Message(models.Model):
preview = fields.Char(
'Preview', compute='_compute_preview',
help='The text-only beginning of the body used as email preview.')
# Attachments are linked to a document through model / res_id and to the message through this field.
attachment_ids = fields.Many2many(
'ir.attachment', 'message_attachment_rel',
'message_id', 'attachment_id',
string='Attachments',
help='Attachments are linked to a document through model / res_id and to the message '
'through this field.')
string='Attachments')
parent_id = fields.Many2one(
'mail.message', 'Parent Message', index='btree_not_null', ondelete='set null',
help="Initial thread message.")
'mail.message', 'Parent Message', index='btree_not_null', ondelete='set null')
child_ids = fields.One2many('mail.message', 'parent_id', 'Child Messages')
# related document
model = fields.Char('Related Document Model')
res_id = fields.Many2oneReference('Related Document ID', model_field='model')
record_name = fields.Char('Message Record Name', help="Name get of the related document.")
record_name = fields.Char('Message Record Name') # name_get() of the related document
# characteristics
message_type = fields.Selection([
('email', 'Email'),
@@ -138,11 +136,9 @@ class Message(models.Model):
'res.partner', 'mail_notification', string='Partners with Need Action',
context={'active_test': False}, depends=['notification_ids'])
needaction = fields.Boolean(
'Need Action', compute='_compute_needaction', search='_search_needaction',
help='Need Action')
'Need Action', compute='_compute_needaction', search='_search_needaction')
has_error = fields.Boolean(
'Has error', compute='_compute_has_error', search='_search_has_error',
help='Has error')
'Has error', compute='_compute_has_error', search='_search_has_error')
# notifications
notification_ids = fields.One2many(
'mail.notification', 'mail_message_id', 'Notifications',
+1 -1
View File
@@ -30,7 +30,7 @@ class MailTemplate(models.Model):
# description
name = fields.Char('Name', translate=True)
model_id = fields.Many2one('ir.model', 'Applies to', help="The type of document this template can be used with")
model_id = fields.Many2one('ir.model', 'Applies to')
model = fields.Char('Related Document Model', related='model_id.model', index=True, store=True, readonly=True)
subject = fields.Char('Subject', translate=True, prefetch=True, help="Subject (placeholders may be used here)")
email_from = fields.Char('From',
+4 -5
View File
@@ -91,8 +91,7 @@ class MailComposer(models.TransientModel):
subject = fields.Char('Subject', compute=False)
body = fields.Html('Contents', render_engine='qweb', compute=False, default='', sanitize_style=True)
parent_id = fields.Many2one(
'mail.message', 'Parent Message', ondelete='set null',
help="Initial thread message.")
'mail.message', 'Parent Message', ondelete='set null')
template_id = fields.Many2one('mail.template', 'Use template', domain="[('model', '=', model)]")
attachment_ids = fields.Many2many(
'ir.attachment', 'mail_compose_message_ir_attachments_rel',
@@ -111,7 +110,7 @@ class MailComposer(models.TransientModel):
('mass_post', 'Post on Multiple Documents')], string='Composition mode', default='comment')
model = fields.Char('Related Document Model')
res_id = fields.Integer('Related Document ID')
record_name = fields.Char('Message Record Name', help="Name get of the related document.")
record_name = fields.Char('Message Record Name')
use_active_domain = fields.Boolean('Use active domain')
active_domain = fields.Text('Active domain', readonly=True)
# characteristics
@@ -135,8 +134,8 @@ class MailComposer(models.TransientModel):
('new', 'Collect replies on a specific email address')],
string='Replies', compute='_compute_reply_to_mode', inverse='_inverse_reply_to_mode',
help="Original Discussion: Answers go in the original document discussion thread. \n Another Email Address: Answers go to the email address mentioned in the tracking message-id instead of original document discussion thread. \n This has an impact on the generated message-id.")
is_log = fields.Boolean('Log an Internal Note',
help='Whether the message is an internal note (comment mode only)')
is_log = fields.Boolean('Log as Internal Note') # comment mode only
partner_ids = fields.Many2many(
'res.partner', 'mail_compose_message_res_partner_rel',
'wizard_id', 'partner_id', 'Additional Contacts',
+1 -1
View File
@@ -19,7 +19,7 @@ class ResPartnerIap(models.Model):
_name = 'res.partner.iap'
_description = 'Partner IAP'
partner_id = fields.Many2one('res.partner', string='Partner', help='Corresponding partner',
partner_id = fields.Many2one('res.partner', string='Partner',
ondelete='cascade', required=True)
iap_search_domain = fields.Char('Search Domain / Email', help='Domain used to find the company')
iap_enrich_info = fields.Text('IAP Enrich Info', help='IAP response stored as a JSON string', readonly=True)
+4 -4
View File
@@ -70,8 +70,7 @@ class MassMailing(models.Model):
active = fields.Boolean(default=True, tracking=True)
subject = fields.Char(
'Subject', help='Subject of your Mailing',
required=True, translate=False)
'Subject', required=True, translate=False)
preview = fields.Char(
'Preview', translate=False,
help='Catchy preview sentence that encourages recipients to open this email.\n'
@@ -106,8 +105,9 @@ class MassMailing(models.Model):
# don't translate 'body_arch', the translations are only on 'body_html'
body_arch = fields.Html(string='Body', translate=False, sanitize=False)
body_html = fields.Html(string='Body converted to be sent by mail', render_engine='qweb', sanitize=False)
is_body_empty = fields.Boolean(compute="_compute_is_body_empty",
help='Technical field used to determine if the mail body is empty')
# used to determine if the mail body is empty
is_body_empty = fields.Boolean(compute="_compute_is_body_empty")
attachment_ids = fields.Many2many(
'ir.attachment', 'mass_mailing_ir_attachments_rel',
'mass_mailing_id', 'attachment_id', string='Attachments')
+1 -1
View File
@@ -63,7 +63,7 @@ class MailingTrace(models.Model):
index='btree_not_null',
)
email = fields.Char(string="Email", help="Normalized email address")
message_id = fields.Char(string='Message-ID', help="Technical field for the email Message-ID (RFC 2392)")
message_id = fields.Char(string='Message-ID') # email Message-ID (RFC 2392)
medium_id = fields.Many2one(related='mass_mailing_id.medium_id')
source_id = fields.Many2one(related='mass_mailing_id.source_id')
# document
@@ -41,11 +41,9 @@ class Mailing(models.Model):
store=True, readonly=False)
sms_template_id = fields.Many2one('sms.template', string='SMS Template', ondelete='set null')
sms_has_insufficient_credit = fields.Boolean(
'Insufficient IAP credits', compute='_compute_sms_has_iap_failure',
help='UX Field to propose to buy IAP credits')
'Insufficient IAP credits', compute='_compute_sms_has_iap_failure') # used to propose buying IAP credits
sms_has_unregistered_account = fields.Boolean(
'Unregistered IAP account', compute='_compute_sms_has_iap_failure',
help='UX Field to propose to Register the SMS IAP account')
'Unregistered IAP account', compute='_compute_sms_has_iap_failure') # used to propose to Register the SMS IAP account
sms_force_send = fields.Boolean(
'Send Directly', help='Immediately send the SMS Mailing instead of queuing up. Use at your own risk.')
# opt_out_link
@@ -20,10 +20,9 @@ class MailingTrace(models.Model):
sms_sms_id = fields.Many2one('sms.sms', string='SMS', index='btree_not_null', ondelete='set null')
sms_sms_id_int = fields.Integer(
string='SMS ID (tech)',
help='ID of the related sms.sms. This field is an integer field because '
'the related sms.sms can be deleted separately from its statistics. '
'However the ID is needed for several action and controllers.',
index='btree_not_null',
index='btree_not_null'
# Integer because the related sms.sms can be deleted separately from its statistics.
# However the ID is needed for several action and controllers.
)
sms_number = fields.Char('Number')
sms_code = fields.Char('Code')
@@ -23,7 +23,7 @@ class ReportMembership(models.Model):
_rec_name = 'start_date'
start_date = fields.Date(string='Start Date', readonly=True)
date_to = fields.Date(string='End Date', readonly=True, help="End membership date")
date_to = fields.Date(string='End Date', readonly=True)
num_waiting = fields.Integer(string='# Waiting', readonly=True)
num_invoiced = fields.Integer(string='# Invoiced', readonly=True)
num_paid = fields.Integer(string='# Paid', readonly=True)
+3 -5
View File
@@ -23,9 +23,7 @@ class MrpBom(models.Model):
return self.env['uom.uom'].search([], limit=1, order='id').id
code = fields.Char('Reference')
active = fields.Boolean(
'Active', default=True,
help="If the active field is set to False, it will allow you to hide the bills of material without removing it.")
active = fields.Boolean('Active', default=True)
type = fields.Selection([
('normal', 'Manufacture this product'),
('phantom', 'Kit')], 'BoM Type',
@@ -50,12 +48,12 @@ class MrpBom(models.Model):
default=_get_default_product_uom_id, required=True,
help="Unit of Measure (Unit of Measure) is the unit of measurement for the inventory control", domain="[('category_id', '=', product_uom_category_id)]")
product_uom_category_id = fields.Many2one(related='product_tmpl_id.uom_id.category_id')
sequence = fields.Integer('Sequence', help="Gives the sequence order when displaying a list of bills of material.")
sequence = fields.Integer('Sequence')
operation_ids = fields.One2many('mrp.routing.workcenter', 'bom_id', 'Operations', copy=True)
ready_to_produce = fields.Selection([
('all_available', ' When all components are available'),
('asap', 'When components for 1st operation are available')], string='Manufacturing Readiness',
default='all_available', help="Defines when a Manufacturing Order is considered as ready to be started", required=True)
default='all_available', required=True)
picking_type_id = fields.Many2one(
'stock.picking.type', 'Operation Type', domain="[('code', '=', 'mrp_operation'), ('company_id', '=', company_id)]",
check_company=True,
+1 -1
View File
@@ -29,7 +29,7 @@ class MrpDocument(models.Model):
('0', 'Normal'),
('1', 'Low'),
('2', 'High'),
('3', 'Very High')], string="Priority", help='Gives the sequence order when displaying a list of MRP documents.')
('3', 'Very High')], string="Priority") # used to order
def unlink(self):
self.mapped('ir_attachment_id').unlink()
+2 -2
View File
@@ -109,8 +109,8 @@ class MrpProduction(models.Model):
date_deadline = fields.Datetime(
'Deadline', copy=False, store=True, readonly=True, compute='_compute_date_deadline',
help="Informative date allowing to define when the manufacturing order should be processed at the latest to fulfill delivery on time.")
date_start = fields.Datetime('Start Date', copy=False, readonly=True, help="Date of the WO")
date_finished = fields.Datetime('End Date', copy=False, readonly=True, help="Date when the MO has been close")
date_start = fields.Datetime('Start Date', copy=False, readonly=True)
date_finished = fields.Datetime('End Date', copy=False, readonly=True)
production_duration_expected = fields.Float("Expected Duration", help="Total expected duration (in minutes)", compute='_compute_production_duration_expected')
production_real_duration = fields.Float("Real Duration", help="Total real duration (in minutes)", compute='_compute_production_real_duration')
+3 -5
View File
@@ -19,15 +19,13 @@ class MrpRoutingWorkcenter(models.Model):
help="Gives the sequence order when displaying a list of routing Work Centers.")
bom_id = fields.Many2one(
'mrp.bom', 'Bill of Material',
index=True, ondelete='cascade', required=True, check_company=True,
help="The Bill of Material this operation is linked to")
index=True, ondelete='cascade', required=True, check_company=True)
company_id = fields.Many2one('res.company', 'Company', related='bom_id.company_id')
worksheet_type = fields.Selection([
('pdf', 'PDF'), ('google_slide', 'Google Slide'), ('text', 'Text')],
string="Work Sheet", default="text",
help="Defines if you want to use a PDF or a Google Slide as work sheet."
string="Work Sheet", default="text"
)
note = fields.Html('Description', help="Text worksheet description")
note = fields.Html('Description')
worksheet = fields.Binary('PDF')
worksheet_google_slide = fields.Char('Google Slide', help="Paste the url of your Google Slide. Make sure the access to the document is public.")
time_mode = fields.Selection([
+1 -1
View File
@@ -54,7 +54,7 @@ class MrpUnbuild(models.Model):
lot_id = fields.Many2one(
'stock.lot', 'Lot/Serial Number',
domain="[('product_id', '=', product_id), ('company_id', '=', company_id)]", check_company=True,
states={'done': [('readonly', True)]}, help="Lot/Serial Number of the product to unbuild.")
states={'done': [('readonly', True)]})
has_tracking=fields.Selection(related='product_id.tracking', readonly=True)
location_id = fields.Many2one(
'stock.location', 'Source Location',
+4 -5
View File
@@ -28,8 +28,7 @@ class MrpWorkcenter(models.Model):
code = fields.Char('Code', copy=False)
note = fields.Html(
'Description',
help="Description of the Work Center.")
'Description')
default_capacity = fields.Float(
'Capacity', default=1.0,
help="Default number of pieces (in product UoM) that can be produced in parallel (at the same time) at this work center. For example: the capacity is 5 and you need to produce 10 units, then the operation time listed on the BOM will be multiplied by two. However, note that both time before and after production will only be counted once.")
@@ -37,9 +36,9 @@ class MrpWorkcenter(models.Model):
'Sequence', default=1, required=True,
help="Gives the sequence order when displaying a list of work centers.")
color = fields.Integer('Color')
costs_hour = fields.Float(string='Cost per hour', help='Specify cost of work center per hour.', default=0.0)
time_start = fields.Float('Setup Time', help="Time in minutes for the setup.")
time_stop = fields.Float('Cleanup Time', help="Time in minutes for the cleaning.")
costs_hour = fields.Float(string='Cost per hour', help='Hourly cost of work center.', default=0.0)
time_start = fields.Float('Setup Time')
time_stop = fields.Float('Cleanup Time')
routing_line_ids = fields.One2many('mrp.routing.workcenter', 'workcenter_id', "Routing Lines")
order_ids = fields.One2many('mrp.workorder', 'workcenter_id', "Orders")
workorder_count = fields.Integer('# Work Orders', compute='_compute_workorder_count')
+6 -10
View File
@@ -29,20 +29,17 @@ class MrpWorkorder(models.Model):
states={'done': [('readonly', True)], 'cancel': [('readonly', True)], 'progress': [('readonly', True)]},
group_expand='_read_group_workcenter_id', check_company=True)
working_state = fields.Selection(
string='Workcenter Status', related='workcenter_id.working_state',
help='Technical: used in views only')
string='Workcenter Status', related='workcenter_id.working_state') # technical: used in views only
product_id = fields.Many2one(related='production_id.product_id', readonly=True, store=True, check_company=True)
product_tracking = fields.Selection(related="product_id.tracking")
product_uom_id = fields.Many2one('uom.uom', 'Unit of Measure', required=True, readonly=True)
production_id = fields.Many2one('mrp.production', 'Manufacturing Order', required=True, check_company=True, readonly=True)
production_availability = fields.Selection(
string='Stock Availability', readonly=True,
related='production_id.reservation_state', store=True,
help='Technical: used in views and domains only.')
related='production_id.reservation_state', store=True) # Technical: used in views and domains only
production_state = fields.Selection(
string='Production State', readonly=True,
related='production_id.state',
help='Technical: used in views only.')
related='production_id.state') # Technical: used in views only
production_bom_id = fields.Many2one('mrp.bom', related='production_id.bom_id')
qty_production = fields.Float('Original Production Quantity', readonly=True, related='production_id.product_qty')
company_id = fields.Many2one(related='production_id.company_id')
@@ -93,7 +90,7 @@ class MrpWorkorder(models.Model):
duration_expected = fields.Float(
'Expected Duration', digits=(16, 2), compute='_compute_duration_expected',
states={'done': [('readonly', True)], 'cancel': [('readonly', True)]},
readonly=False, store=True, help="Expected duration (in minutes)")
readonly=False, store=True) # in minutes
duration = fields.Float(
'Real Duration', compute='_compute_duration', inverse='_set_duration',
readonly=False, store=True, copy=False)
@@ -131,14 +128,13 @@ class MrpWorkorder(models.Model):
time_ids = fields.One2many(
'mrp.workcenter.productivity', 'workorder_id', copy=False)
is_user_working = fields.Boolean(
'Is the Current User Working', compute='_compute_working_users',
help="Technical field indicating whether the current user is working. ")
'Is the Current User Working', compute='_compute_working_users') # technical: is the current user working
working_user_ids = fields.One2many('res.users', string='Working user on this work order.', compute='_compute_working_users')
last_working_user_id = fields.One2many('res.users', string='Last user that worked on this work order.', compute='_compute_working_users')
costs_hour = fields.Float(
string='Cost per hour',
help='Technical field to store the hourly cost of workcenter at time of work order completion (i.e. to keep a consistent cost).',
default=0.0, group_operator="avg")
# Technical field to store the hourly cost of workcenter at time of work order completion (i.e. to keep a consistent cost).',
scrap_ids = fields.One2many('stock.scrap', 'workorder_id')
scrap_count = fields.Integer(compute='_compute_scrap_move_count', string='Scrap Move')
+1 -3
View File
@@ -130,9 +130,7 @@ class StockMove(models.Model):
help="By-product line that generated the move in a manufacturing order")
unit_factor = fields.Float('Unit Factor', compute='_compute_unit_factor', store=True)
is_done = fields.Boolean(
'Done', compute='_compute_is_done',
store=True,
help='Technical Field to order moves')
'Done', compute='_compute_is_done', store=True)
order_finished_lot_id = fields.Many2one('stock.lot', string="Finished Lot/Serial Number", related="raw_material_production_id.lot_producing_id", store=True)
should_consume_qty = fields.Float('Quantity To Consume', compute='_compute_should_consume_qty', digits='Product Unit of Measure')
cost_share = fields.Float(
+1 -1
View File
@@ -13,7 +13,7 @@ class StockScrap(models.Model):
workorder_id = fields.Many2one(
'mrp.workorder', 'Work Order',
states={'done': [('readonly', True)]},
help='Not to restrict or prefer quants, but informative.', check_company=True)
check_company=True) # Not to restrict or prefer quants, but informative
@api.onchange('workorder_id')
def _onchange_workorder_id(self):
@@ -14,9 +14,9 @@ class StockAssignSerialNumbers(models.TransientModel):
expected_qty = fields.Float('Expected Quantity', digits='Product Unit of Measure')
serial_numbers = fields.Text('Produced Serial Numbers')
produced_qty = fields.Float('Produced Quantity', digits='Product Unit of Measure')
show_apply = fields.Boolean(help="Technical field to show the Apply button")
show_backorders = fields.Boolean(help="Technical field to show the Create Backorder and No Backorder buttons")
multiple_lot_components_names = fields.Text(help="Names of components with multiple lots, used to show warning")
show_apply = fields.Boolean() # Technical field to show the Apply button
show_backorders = fields.Boolean() # Technical field to show the Create Backorder and No Backorder buttons
multiple_lot_components_names = fields.Text() # Names of components with multiple lots, used to show warning
def generate_serial_numbers_production(self):
if self.next_serial_number and self.next_serial_count:
+5 -2
View File
@@ -10,13 +10,16 @@ from odoo.tools import float_is_zero, float_round
class MrpProductionWorkcenterLineTime(models.Model):
_inherit = 'mrp.workcenter.productivity'
cost_already_recorded = fields.Boolean('Cost Recorded', help="Technical field automatically checked when a ongoing production posts journal entries for its costs. This way, we can record one production's cost multiple times and only consider new entries in the work centers time lines.")
# checked when a ongoing production posts journal entries for its costs.
# This way, we can record one production's cost multiple times and only
# consider new entries in the work centers time lines."
cost_already_recorded = fields.Boolean('Cost Recorded')
class MrpProduction(models.Model):
_inherit = 'mrp.production'
extra_cost = fields.Float(copy=False, help='Extra cost per produced unit')
extra_cost = fields.Float(copy=False, string='Extra Unit Cost')
show_valuation = fields.Boolean(compute='_compute_show_valuation')
analytic_account_id = fields.Many2one(
'account.analytic.account', 'Analytic Account', copy=True,
@@ -8,9 +8,7 @@ class StockWarehouse(models.Model):
_inherit = 'stock.warehouse'
subcontracting_to_resupply = fields.Boolean(
'Resupply Subcontractors', default=True,
help="Resupply subcontractors with components")
'Resupply Subcontractors', default=True)
subcontracting_mto_pull_id = fields.Many2one(
'stock.rule', 'Subcontracting MTO Rule')
subcontracting_pull_id = fields.Many2one(
+2 -2
View File
@@ -12,8 +12,8 @@ class Stage(models.Model):
_order = 'sequence'
name = fields.Char('Stage Name', translate=True, required=True)
sequence = fields.Integer(help="Used to order the note stages", default=1)
user_id = fields.Many2one('res.users', string='Owner', required=True, ondelete='cascade', default=lambda self: self.env.uid, help="Owner of the note stage")
sequence = fields.Integer(default=1)
user_id = fields.Many2one('res.users', string='Owner', required=True, ondelete='cascade', default=lambda self: self.env.uid)
fold = fields.Boolean('Folded by Default')
-1
View File
@@ -17,7 +17,6 @@ class AccountMove(models.Model):
compute='_compute_authorized_transaction_ids', readonly=True, copy=False)
amount_paid = fields.Monetary(
string="Amount paid",
help="The amount already paid for this invoice.",
compute='_compute_amount_paid'
)
+1 -1
View File
@@ -26,9 +26,9 @@ class AccountPayment(models.Model):
comodel_name='payment.token',
compute='_compute_suitable_payment_token_ids'
)
# Technical field used to hide or show the payment_token_id if needed
use_electronic_payment_method = fields.Boolean(
compute='_compute_use_electronic_payment_method',
help='Technical field used to hide or show the payment_token_id if needed.'
)
# == Fields used for traceability ==
@@ -21,9 +21,9 @@ class AccountPaymentRegister(models.TransientModel):
comodel_name='payment.token',
compute='_compute_suitable_payment_token_ids'
)
# Technical field used to hide or show the payment_token_id if needed
use_electronic_payment_method = fields.Boolean(
compute='_compute_use_electronic_payment_method',
help='Technical field used to hide or show the payment_token_id if needed.'
)
payment_method_code = fields.Char(
related='payment_method_line_id.code')
@@ -15,7 +15,6 @@ class PaymentAcquirer(models.Model):
selection_add=[('alipay', "Alipay")], ondelete={'alipay': 'set default'})
alipay_payment_method = fields.Selection(
string="Account",
help="* Cross-border: For the overseas seller \n* Express Checkout: For the Chinese Seller",
selection=[
('express_checkout', 'Express Checkout (only for Chinese merchants)'),
('standard_checkout', 'Cross-border')
@@ -18,8 +18,8 @@ class PaymentTransaction(models.Model):
_inherit = 'payment.transaction'
# See https://developer.paypal.com/docs/api-basics/notifications/ipn/IPNandPDTVariables/
paypal_type = fields.Char(
string="PayPal Transaction Type", help="This has no use in Odoo except for debugging.")
# this field has no use in Odoo except for debugging
paypal_type = fields.Char(string="PayPal Transaction Type")
def _get_specific_rendering_values(self, processing_values):
""" Override of payment to return Paypal-specific rendering values.
+1 -1
View File
@@ -905,7 +905,7 @@ class PosOrderLine(models.Model):
product_uom_id = fields.Many2one('uom.uom', string='Product UoM', related='product_id.uom_id')
currency_id = fields.Many2one('res.currency', related='order_id.currency_id')
full_product_name = fields.Char('Full Product Name')
customer_note = fields.Char('Customer Note', help='This is a note destined to the customer')
customer_note = fields.Char('Customer Note')
refund_orderline_ids = fields.One2many('pos.order.line', 'refunded_orderline_id', 'Refund Order Lines', help='Orderlines in this field are the lines that refunded this orderline.')
refunded_orderline_id = fields.Many2one('pos.order.line', 'Refunded Order Line', help='If this orderline is a refund, then the refunded orderline is specified in this field.')
refunded_qty = fields.Float('Refunded Quantity', compute='_compute_refund_qty', help='Number of items refunded in this orderline.')
@@ -40,8 +40,8 @@ class PosPaymentMethod(models.Model):
config_ids = fields.Many2many('pos.config', string='Point of Sale Configurations')
company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.company)
use_payment_terminal = fields.Selection(selection=lambda self: self._get_payment_terminal_selection(), string='Use a Payment Terminal', help='Record payments with a terminal on this journal.')
hide_use_payment_terminal = fields.Boolean(compute='_compute_hide_use_payment_terminal', help='Technical field which is used to '
'hide use_payment_terminal when no payment interfaces are installed.')
# used to hide use_payment_terminal when no payment interfaces are installed
hide_use_payment_terminal = fields.Boolean(compute='_compute_hide_use_payment_terminal')
active = fields.Boolean(default=True)
type = fields.Selection(selection=[('cash', 'Cash'), ('bank', 'Bank'), ('pay_later', 'Customer Account')], compute="_compute_type")
+2 -6
View File
@@ -28,7 +28,6 @@ class PosSession(models.Model):
config_id = fields.Many2one(
'pos.config', string='Point of Sale',
help="The physical point of sale you will use.",
required=True,
index=True)
name = fields.Char(string='Session ID', required=True, readonly=True, default='/')
@@ -60,22 +59,19 @@ class PosSession(models.Model):
cash_register_balance_end_real = fields.Monetary(
related='cash_register_id.balance_end_real',
string="Ending Balance",
help="Total of closing cash control lines.",
readonly=True)
cash_register_balance_start = fields.Monetary(
related='cash_register_id.balance_start',
string="Starting Balance",
help="Total of opening cash control lines.",
readonly=True)
cash_register_total_entry_encoding = fields.Monetary(
compute='_compute_cash_balance',
string='Total Cash Transaction',
readonly=True,
help="Total of all paid sales orders")
readonly=True)
cash_register_balance_end = fields.Monetary(
compute='_compute_cash_balance',
string="Theoretical Closing Balance",
help="Sum of opening balance and transactions.",
help="Opening balance summed to all cash transactions.",
readonly=True)
cash_register_difference = fields.Monetary(
compute='_compute_cash_balance',
+1 -1
View File
@@ -11,7 +11,7 @@ _logger = logging.getLogger(__name__)
class PosConfig(models.Model):
_inherit = 'pos.config'
adyen_ask_customer_for_tip = fields.Boolean('Ask Customers For Tip', help='Prompt the customer to tip.')
adyen_ask_customer_for_tip = fields.Boolean('Ask Customers For Tip')
@api.constrains('adyen_ask_customer_for_tip', 'iface_tipproduct', 'tip_product_id')
def _check_adyen_ask_customer_for_tip(self):
@@ -24,8 +24,8 @@ class PosPaymentMethod(models.Model):
adyen_terminal_identifier = fields.Char(help='[Terminal model]-[Serial number], for example: P400Plus-123456789', copy=False)
adyen_test_mode = fields.Boolean(help='Run transactions in the test environment.')
adyen_latest_response = fields.Char(help='Technical field used to buffer the latest asynchronous notification from Adyen.', copy=False, groups='base.group_erp_manager')
adyen_latest_diagnosis = fields.Char(help='Technical field used to determine if the terminal is still connected.', copy=False, groups='base.group_erp_manager')
adyen_latest_response = fields.Char(copy=False, groups='base.group_erp_manager') # used to buffer the latest asynchronous notification from Adyen.
adyen_latest_diagnosis = fields.Char(copy=False, groups='base.group_erp_manager') # used to determine if the terminal is still connected.
@api.constrains('adyen_terminal_identifier')
def _check_adyen_terminal_identifier(self):
+2 -2
View File
@@ -9,9 +9,9 @@ class PosConfig(models.Model):
_inherit = 'pos.config'
iface_discount = fields.Boolean(string='Order Discounts', help='Allow the cashier to give discounts on the whole order.')
discount_pc = fields.Float(string='Discount Percentage', help='The default discount percentage', default=10.0)
discount_pc = fields.Float(string='Discount Percentage', help='The default discount percentage when clicking on the Discount button', default=10.0)
discount_product_id = fields.Many2one('product.product', string='Discount Product',
domain="[('sale_ok', '=', True)]", help='The product used to model the discount.')
domain="[('sale_ok', '=', True)]", help='The product used to apply the discount on the ticket.')
@api.model
def _default_discount_value_on_module_install(self):
@@ -8,4 +8,4 @@ class RestaurantPrinter(models.Model):
_inherit = 'restaurant.printer'
printer_type = fields.Selection(selection_add=[('epson_epos', 'Use an Epson printer')])
epson_printer_ip = fields.Char(string='Epson Receipt Printer IP Address', help="Local IP address of an Epson receipt printer.")
epson_printer_ip = fields.Char(string='Epson Printer IP Address', help="Local IP address of an Epson receipt printer.")
+1 -1
View File
@@ -32,7 +32,7 @@ class PoSPayment(models.Model):
mercury_card_number = fields.Char(string='Card Number', help='The last 4 numbers of the card used to pay')
mercury_prefixed_card_number = fields.Char(string='Card Number Prefix', compute='_compute_prefixed_card_number', help='The card number used for the payment.')
mercury_card_brand = fields.Char(string='Card Brand', help='The brand of the payment card (e.g. Visa, AMEX, ...)')
mercury_card_owner_name = fields.Char(string='Card Owner Name', help='The name of the card owner')
mercury_card_owner_name = fields.Char(string='Card Owner Name')
mercury_ref_no = fields.Char(string='Vantiv reference number', help='Payment reference number from Vantiv Pay')
mercury_record_no = fields.Char(string='Vantiv record number', help='Payment record number from Vantiv Pay')
mercury_invoice_no = fields.Char(string='Vantiv invoice number', help='Invoice number from Vantiv Pay')
@@ -9,13 +9,14 @@ class RestaurantFloor(models.Model):
_name = 'restaurant.floor'
_description = 'Restaurant Floor'
_order = "sequence, name"
name = fields.Char('Floor Name', required=True, help='An internal identification of the restaurant floor')
name = fields.Char('Floor Name', required=True)
pos_config_id = fields.Many2one('pos.config', string='Point of Sale')
background_image = fields.Binary('Background Image', help='A background image used to display a floor layout in the point of sale interface')
background_color = fields.Char('Background Color', help='The background color of the floor layout, (must be specified in a html-compatible format)', default='rgb(210, 210, 210)')
table_ids = fields.One2many('restaurant.table', 'floor_id', string='Tables', help='The list of tables in this floor')
sequence = fields.Integer('Sequence', help='Used to sort Floors', default=1)
background_image = fields.Binary('Background Image')
background_color = fields.Char('Background Color', help='The background color of the floor in a html-compatible format', default='rgb(210, 210, 210)')
table_ids = fields.One2many('restaurant.table', 'floor_id', string='Tables')
sequence = fields.Integer('Sequence', default=1)
active = fields.Boolean(default=True)
@api.ondelete(at_uninstall=False)
@@ -29,7 +29,7 @@ class SupplierInfo(models.Model):
partner_id = fields.Many2one(
'res.partner', 'Vendor',
ondelete='cascade', required=True,
help="Vendor of this product", check_company=True)
check_company=True)
product_name = fields.Char(
'Vendor Product Name',
help="This vendor's product name will be used when printing a request for quotation. Keep empty to use the internal one.")
@@ -40,8 +40,7 @@ class SupplierInfo(models.Model):
'Sequence', default=1, help="Assigns the priority to the list of product vendor.")
product_uom = fields.Many2one(
'uom.uom', 'Unit of Measure',
related='product_tmpl_id.uom_po_id',
help="This comes from the product form.")
related='product_tmpl_id.uom_po_id')
min_qty = fields.Float(
'Quantity', default=0.0, required=True, digits="Product Unit Of Measure",
help="The quantity to purchase from this vendor to benefit from the price, expressed in the vendor Product Unit of Measure if not any, in the default unit of measure of the product otherwise.")

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