Replace usage of docstring of Model by __string__ attribute

Closes #8402
This commit is contained in:
Udo Spallek
2024-11-19 10:09:52 +01:00
parent d99d001dfe
commit 8b252472c4
315 changed files with 122 additions and 1282 deletions
+1 -32
View File
@@ -134,7 +134,6 @@ def TypeMixin(template=False):
class TypeTemplate(
TypeMixin(template=True), sequence_ordered(), tree(separator='\\'),
ModelSQL, ModelView):
'Account Type Template'
__name__ = 'account.account.type.template'
parent = fields.Many2One(
'account.account.type.template', "Parent", ondelete='RESTRICT',
@@ -221,7 +220,6 @@ class TypeTemplate(
class Type(
TypeMixin(), sequence_ordered(), tree(separator='\\'),
ModelSQL, ModelView):
'Account Type'
__name__ = 'account.account.type'
parent = fields.Many2One('account.account.type', 'Parent',
@@ -445,7 +443,6 @@ class Type(
class OpenType(Wizard):
'Open Type'
__name__ = 'account.account.open_type'
start = StateTransition()
account = StateAction('account.act_account_balance_sheet')
@@ -661,7 +658,6 @@ def AccountMixin(template=False):
class AccountTemplate(
AccountMixin(template=True), PeriodMixin, tree(), ModelSQL, ModelView):
'Account Template'
__name__ = 'account.account.template'
type = fields.Many2One(
'account.account.type.template', "Type", ondelete="RESTRICT")
@@ -833,7 +829,6 @@ class AccountTemplate(
class AccountTemplateTaxTemplate(ModelSQL):
'Account Template - Tax Template'
__name__ = 'account.account.template-account.tax.template'
account = fields.Many2One(
'account.account.template', "Account Template",
@@ -853,7 +848,6 @@ class AccountTemplateTaxTemplate(ModelSQL):
class Account(
AccountMixin(), ContextCompanyMixin, ActivePeriodMixin, tree(),
ModelSQL, ModelView):
'Account'
__name__ = 'account.account'
_states = {
'readonly': (Bool(Eval('template', -1))
@@ -1464,7 +1458,6 @@ class Account(
class AccountParty(ActivePeriodMixin, ModelSQL):
"Account Party"
__name__ = 'account.account.party'
account = fields.Many2One('account.account', "Account")
party = fields.Many2One(
@@ -1690,11 +1683,7 @@ class AccountParty(ActivePeriodMixin, ModelSQL):
class AccountDeferral(ModelSQL, ModelView):
'''
Account Deferral
It is used to deferral the debit/credit of account by fiscal year.
'''
"Used to defer the debit/credit of accounts by fiscal year"
__name__ = 'account.account.deferral'
account = fields.Many2One('account.account', "Account", required=True)
fiscalyear = fields.Many2One(
@@ -1839,7 +1828,6 @@ class AccountDeferral(ModelSQL, ModelView):
class AccountTax(ModelSQL):
'Account - Tax'
__name__ = 'account.account-account.tax'
account = fields.Many2One(
'account.account', "Account", ondelete='CASCADE', required=True)
@@ -1855,7 +1843,6 @@ class AccountTax(ModelSQL):
class AccountContext(ModelView):
'Account Context'
__name__ = 'account.account.context'
company = fields.Many2One('company.company', "Company", required=True)
@@ -2150,7 +2137,6 @@ class _GeneralLedgerAccount(ActivePeriodMixin, ModelSQL, ModelView):
class GeneralLedgerAccount(_GeneralLedgerAccount):
'General Ledger Account'
__name__ = 'account.general_ledger.account'
type = fields.Many2One('account.account.type', "Type")
@@ -2167,7 +2153,6 @@ class GeneralLedgerAccount(_GeneralLedgerAccount):
class GeneralLedgerAccountContext(ModelView):
'General Ledger Account Context'
__name__ = 'account.general_ledger.account.context'
fiscalyear = fields.Many2One('account.fiscalyear', 'Fiscal Year',
required=True,
@@ -2324,7 +2309,6 @@ class GeneralLedgerAccountContext(ModelView):
class GeneralLedgerAccountParty(_GeneralLedgerAccount):
"General Ledger Account Party"
__name__ = 'account.general_ledger.account.party'
party = fields.Many2One(
@@ -2360,7 +2344,6 @@ class GeneralLedgerAccountParty(_GeneralLedgerAccount):
class OpenGeneralLedgerAccountParty(Wizard):
"Open General Ledger Account Party"
__name__ = 'account.general_ledger.account.party.open'
start_state = 'open'
open = StateAction('account.act_general_ledger_line_form')
@@ -2380,7 +2363,6 @@ class OpenGeneralLedgerAccountParty(Wizard):
class GeneralLedgerLine(DescriptionOriginMixin, ModelSQL, ModelView):
'General Ledger Line'
__name__ = 'account.general_ledger.line'
move = fields.Many2One('account.move', 'Move')
@@ -2578,7 +2560,6 @@ class GeneralLedgerLine(DescriptionOriginMixin, ModelSQL, ModelView):
class GeneralLedgerLineContext(GeneralLedgerAccountContext):
'General Ledger Line Context'
__name__ = 'account.general_ledger.line.context'
party_cumulate = fields.Boolean('Cumulate per Party')
@@ -2656,7 +2637,6 @@ class TrialBalance(Report):
class BalanceSheetContext(ModelView):
'Balance Sheet Context'
__name__ = 'account.balance_sheet.context'
date = fields.Date('Date', required=True)
company = fields.Many2One('company.company', 'Company', required=True)
@@ -2677,7 +2657,6 @@ class BalanceSheetContext(ModelView):
class BalanceSheetComparisionContext(BalanceSheetContext):
'Balance Sheet Context'
__name__ = 'account.balance_sheet.comparison.context'
comparison = fields.Boolean('Comparison')
date_cmp = fields.Date('Date', states={
@@ -2705,7 +2684,6 @@ class BalanceSheetComparisionContext(BalanceSheetContext):
class IncomeStatementContext(ModelView):
'Income Statement Context'
__name__ = 'account.income_statement.context'
fiscalyear = fields.Many2One('account.fiscalyear', 'Fiscal Year',
required=True,
@@ -2912,7 +2890,6 @@ class IncomeStatementContext(ModelView):
class AgedBalanceContext(ModelView):
'Aged Balance Context'
__name__ = 'account.aged_balance.context'
type = fields.Selection([
('customer', 'Customers'),
@@ -2988,7 +2965,6 @@ class AgedBalanceContext(ModelView):
class AgedBalance(ModelSQL, ModelView):
'Aged Balance'
__name__ = 'account.aged_balance'
party = fields.Many2One(
@@ -3165,12 +3141,10 @@ class AgedBalanceReport(Report):
class CreateChartStart(ModelView):
'Create Chart'
__name__ = 'account.create_chart.start'
class CreateChartAccount(ModelView):
'Create Chart'
__name__ = 'account.create_chart.account'
company = fields.Many2One('company.company', 'Company', required=True)
account_template = fields.Many2One('account.account.template',
@@ -3182,7 +3156,6 @@ class CreateChartAccount(ModelView):
class CreateChartProperties(ModelView):
'Create Chart'
__name__ = 'account.create_chart.properties'
company = fields.Many2One('company.company', 'Company')
account_receivable = fields.Many2One('account.account',
@@ -3204,7 +3177,6 @@ class CreateChartProperties(ModelView):
class CreateChart(Wizard):
'Create Chart'
__name__ = 'account.create_chart'
start = StateView('account.create_chart.start',
'account.create_chart_start_view_form', [
@@ -3354,7 +3326,6 @@ class CreateChart(Wizard):
class UpdateChartStart(ModelView):
'Update Chart'
__name__ = 'account.update_chart.start'
account = fields.Many2One(
'account.account', "Root Account", required=True,
@@ -3365,12 +3336,10 @@ class UpdateChartStart(ModelView):
class UpdateChartSucceed(ModelView):
'Update Chart'
__name__ = 'account.update_chart.succeed'
class UpdateChart(Wizard):
'Update Chart'
__name__ = 'account.update_chart'
start = StateView('account.update_chart.start',
'account.update_chart_start_view_form', [
-6
View File
@@ -14,7 +14,6 @@ tax_roundings = [
class Configuration(
ModelSingleton, ModelSQL, ModelView, CompanyMultiValueMixin):
'Account Configuration'
__name__ = 'account.configuration'
default_account_receivable = fields.MultiValue(fields.Many2One(
'account.account', "Default Account Receivable",
@@ -111,7 +110,6 @@ class Configuration(
class ConfigurationDefaultAccount(ModelSQL, CompanyValueMixin):
"Account Configuration Default Account"
__name__ = 'account.configuration.default_account'
default_account_receivable = fields.Many2One(
'account.account', "Default Account Receivable",
@@ -146,7 +144,6 @@ class ConfigurationDefaultAccount(ModelSQL, CompanyValueMixin):
class DefaultTaxRule(ModelSQL, CompanyValueMixin):
"Account Configuration Default Tax Rule"
__name__ = 'account.configuration.default_tax_rule'
default_customer_tax_rule = fields.Many2One(
'account.tax.rule', "Default Customer Tax Rule",
@@ -163,7 +160,6 @@ class DefaultTaxRule(ModelSQL, CompanyValueMixin):
class ConfigurationTaxRounding(ModelSQL, CompanyValueMixin):
'Account Configuration Tax Rounding'
__name__ = 'account.configuration.tax_rounding'
configuration = fields.Many2One('account.configuration', 'Configuration',
required=True, ondelete='CASCADE',
@@ -179,7 +175,6 @@ class ConfigurationTaxRounding(ModelSQL, CompanyValueMixin):
class Sequence(ModelSQL, CompanyValueMixin):
"Account Configuration Sequence"
__name__ = 'account.configuration.sequence'
reconciliation_sequence = fields.Many2One(
'ir.sequence', "Reconciliation Sequence", required=True,
@@ -201,7 +196,6 @@ class Sequence(ModelSQL, CompanyValueMixin):
class Journal(ModelSQL, CompanyValueMixin):
"Account Configuration Journal"
__name__ = 'account.configuration.journal'
currency_exchange_journal = fields.Many2One(
'account.journal', "Currency Exchange Journal",
-7
View File
@@ -29,7 +29,6 @@ STATES = {
class FiscalYear(Workflow, ModelSQL, ModelView):
'Fiscal Year'
__name__ = 'account.fiscalyear'
name = fields.Char('Name', size=None, required=True)
start_date = fields.Date('Starting Date', required=True, states=STATES,
@@ -375,7 +374,6 @@ class FiscalYear(Workflow, ModelSQL, ModelView):
class BalanceNonDeferralStart(ModelView):
'Balance Non-Deferral'
__name__ = 'account.fiscalyear.balance_non_deferral.start'
fiscalyear = fields.Many2One('account.fiscalyear', 'Fiscal Year',
required=True, domain=[('state', '=', 'open')])
@@ -417,7 +415,6 @@ class BalanceNonDeferralStart(ModelView):
class BalanceNonDeferral(Wizard):
'Balance Non-Deferral'
__name__ = 'account.fiscalyear.balance_non_deferral'
start = StateView('account.fiscalyear.balance_non_deferral.start',
'account.fiscalyear_balance_non_deferral_start_view_form', [
@@ -501,7 +498,6 @@ class BalanceNonDeferral(Wizard):
class CreatePeriodsStart(ModelView):
"Create Periods Start"
__name__ = 'account.fiscalyear.create_periods.start'
frequency = fields.Selection([
('monthly', "Monthly"),
@@ -540,7 +536,6 @@ class CreatePeriodsStart(ModelView):
class CreatePeriods(Wizard):
"Create Periods"
__name__ = 'account.fiscalyear.create_periods'
start = StateView('account.fiscalyear.create_periods.start',
'account.fiscalyear_create_periods_start_view_form', [
@@ -561,7 +556,6 @@ def month_delta(d1, d2):
class RenewFiscalYearStart(ModelView):
"Renew Fiscal Year Start"
__name__ = 'account.fiscalyear.renew.start'
name = fields.Char("Name", required=True)
company = fields.Many2One('company.company', "Company", required=True)
@@ -614,7 +608,6 @@ class RenewFiscalYearStart(ModelView):
class RenewFiscalYear(Wizard):
"Renew Fiscal Year"
__name__ = 'account.fiscalyear.renew'
start = StateView('account.fiscalyear.renew.start',
'account.fiscalyear_renew_start_view_form', [
-4
View File
@@ -28,7 +28,6 @@ class Journal(
DeactivableMixin, MatchMixin,
sequence_ordered('matching_sequence', "Matching Sequence"),
ModelSQL, ModelView, CompanyMultiValueMixin):
'Journal'
__name__ = 'account.journal'
name = fields.Char('Name', size=None, required=True, translate=True)
code = fields.Char('Code', size=None)
@@ -187,7 +186,6 @@ class Journal(
class JournalSequence(ModelSQL, CompanyValueMixin):
"Journal Sequence"
__name__ = 'account.journal.sequence'
journal = fields.Many2One(
'account.journal', "Journal", ondelete='CASCADE',
@@ -215,7 +213,6 @@ class JournalSequence(ModelSQL, CompanyValueMixin):
class JournalCashContext(ModelView):
'Journal Cash Context'
__name__ = 'account.journal.open_cash.context'
start_date = fields.Date('Start Date', required=True)
end_date = fields.Date('End Date', required=True)
@@ -227,7 +224,6 @@ class JournalCashContext(ModelView):
class JournalPeriod(Workflow, ModelSQL, ModelView):
'Journal - Period'
__name__ = 'account.journal.period'
journal = fields.Many2One(
'account.journal', 'Journal', required=True, ondelete='CASCADE',
-24
View File
@@ -83,7 +83,6 @@ class DescriptionOriginMixin:
class Move(DescriptionOriginMixin, ModelSQL, ModelView):
'Account Move'
__name__ = 'account.move'
_rec_name = 'number'
number = fields.Char('Number', required=True, readonly=True)
@@ -565,7 +564,6 @@ class Move(DescriptionOriginMixin, ModelSQL, ModelView):
class Reconciliation(ModelSQL, ModelView):
'Account Move Reconciliation Lines'
__name__ = 'account.move.reconciliation'
_rec_name = 'number'
number = fields.Char("Number", required=True)
@@ -900,7 +898,6 @@ class MoveLineMixin:
class Line(DescriptionOriginMixin, MoveLineMixin, ModelSQL, ModelView):
'Account Move Line'
__name__ = 'account.move.line'
_states = {
@@ -1871,7 +1868,6 @@ class Line(DescriptionOriginMixin, MoveLineMixin, ModelSQL, ModelView):
class LineReceivablePayableContext(ModelView):
"Receivable/Payable Line Context"
__name__ = 'account.move.line.receivable_payable.context'
reconciled = fields.Boolean("Reconciled")
@@ -1892,7 +1888,6 @@ class LineReceivablePayableContext(ModelView):
class WriteOff(DeactivableMixin, ModelSQL, ModelView):
'Reconcile Write Off'
__name__ = 'account.move.reconcile.write_off'
company = fields.Many2One('company.company', "Company", required=True)
name = fields.Char("Name", required=True, translate=True)
@@ -1928,7 +1923,6 @@ class WriteOff(DeactivableMixin, ModelSQL, ModelView):
class OpenJournalAsk(ModelView):
'Open Journal Ask'
__name__ = 'account.move.open_journal.ask'
journal = fields.Many2One('account.journal', 'Journal', required=True)
period = fields.Many2One('account.period', 'Period', required=True,
@@ -1949,7 +1943,6 @@ class OpenJournalAsk(ModelView):
class OpenJournal(Wizard):
'Open Journal'
__name__ = 'account.move.open_journal'
start = StateTransition()
ask = StateView('account.move.open_journal.ask',
@@ -2017,7 +2010,6 @@ class OpenJournal(Wizard):
class OpenAccount(Wizard):
'Open Account'
__name__ = 'account.move.open_account'
start_state = 'open_'
open_ = StateAction('account.act_move_line_form')
@@ -2067,7 +2059,6 @@ class OpenAccount(Wizard):
class ReconcileLinesWriteOff(ModelView):
'Reconcile Lines Write-Off'
__name__ = 'account.move.reconcile_lines.writeoff'
company = fields.Many2One('company.company', "Company", readonly=True)
writeoff = fields.Many2One('account.move.reconcile.write_off', "Write Off",
@@ -2088,7 +2079,6 @@ class ReconcileLinesWriteOff(ModelView):
class ReconcileLines(Wizard):
'Reconcile Lines'
__name__ = 'account.move.reconcile_lines'
start = StateTransition()
writeoff = StateView('account.move.reconcile_lines.writeoff',
@@ -2162,7 +2152,6 @@ class ReconcileLines(Wizard):
class UnreconcileLines(Wizard):
'Unreconcile Lines'
__name__ = 'account.move.unreconcile_lines'
start_state = 'unreconcile'
unreconcile = StateTransition()
@@ -2197,7 +2186,6 @@ class UnreconcileLines(Wizard):
class Reconcile(Wizard):
'Reconcile'
__name__ = 'account.reconcile'
start = StateView(
'account.reconcile.start',
@@ -2458,7 +2446,6 @@ class Reconcile(Wizard):
class ReconcileStart(ModelView):
"Reconcile"
__name__ = 'account.reconcile.start'
automatic = fields.Boolean(
"Automatic",
@@ -2477,7 +2464,6 @@ class ReconcileStart(ModelView):
class ReconcileShow(ModelView):
'Reconcile'
__name__ = 'account.reconcile.show'
company = fields.Many2One('company.company', "Company", readonly=True)
accounts = fields.Many2Many('account.account', None, None, 'Account',
@@ -2548,7 +2534,6 @@ class ReconcileShow(ModelView):
class CancelMoves(Wizard):
'Cancel Moves'
__name__ = 'account.move.cancel'
start_state = 'default'
default = StateView('account.move.cancel.default',
@@ -2610,7 +2595,6 @@ class CancelMoves(Wizard):
class CancelMovesDefault(ModelView):
'Cancel Moves'
__name__ = 'account.move.cancel.default'
description = fields.Char('Description')
reversal = fields.Boolean(
@@ -2623,7 +2607,6 @@ class CancelMovesDefault(ModelView):
class GroupLines(Wizard):
"Group Lines"
__name__ = 'account.move.line.group'
start = StateView('account.move.line.group.start',
'account.move_line_group_start_view_form', [
@@ -2799,7 +2782,6 @@ class GroupLines(Wizard):
class GroupLinesStart(ModelView):
"Group Lines"
__name__ = 'account.move.line.group.start'
journal = fields.Many2One('account.journal', "Journal", required=True)
@@ -2807,7 +2789,6 @@ class GroupLinesStart(ModelView):
class RescheduleLines(Wizard):
"Reschedule Lines"
__name__ = 'account.move.line.reschedule'
start = StateView('account.move.line.reschedule.start',
'account.move_line_reschedule_start_view_form', [
@@ -3035,7 +3016,6 @@ class RescheduleLines(Wizard):
class RescheduleLinesStart(ModelView):
"Reschedule Lines"
__name__ = 'account.move.line.reschedule.start'
start_date = fields.Date("Start Date", required=True)
frequency = fields.Selection([
@@ -3098,7 +3078,6 @@ class RescheduleLinesStart(ModelView):
class RescheduleLinesPreview(ModelView):
"Reschedule Lines"
__name__ = 'account.move.line.reschedule.preview'
journal = fields.Many2One('account.journal', "Journal", required=True)
description = fields.Char("Description")
@@ -3111,7 +3090,6 @@ class RescheduleLinesPreview(ModelView):
class RescheduleLinesTerm(ModelView):
"Reschedule Lines"
__name__ = 'account.move.line.reschedule.term'
date = fields.Date("Date", required=True)
amount = Monetary(
@@ -3120,7 +3098,6 @@ class RescheduleLinesTerm(ModelView):
class DelegateLines(Wizard):
"Delegate Lines"
__name__ = 'account.move.line.delegate'
start = StateView(
'account.move.line.delegate.start',
@@ -3229,7 +3206,6 @@ class DelegateLines(Wizard):
class DelegateLinesStart(ModelView):
"Delegate Lines"
__name__ = 'account.move.line.delegate.start'
journal = fields.Many2One('account.journal', "Journal", required=True)
-7
View File
@@ -21,7 +21,6 @@ from .exceptions import (
class MoveTemplate(DeactivableMixin, ModelSQL, ModelView):
'Account Move Template'
__name__ = 'account.move.template'
name = fields.Char('Name', required=True, translate=True)
keywords = fields.One2Many('account.move.template.keyword', 'move',
@@ -96,7 +95,6 @@ class MoveTemplate(DeactivableMixin, ModelSQL, ModelView):
class MoveTemplateKeyword(sequence_ordered(), ModelSQL, ModelView):
'Account Move Template Keyword'
__name__ = 'account.move.template.keyword'
name = fields.Char('Name', required=True)
string = fields.Char('String', required=True, translate=True)
@@ -200,7 +198,6 @@ class MoveTemplateKeyword(sequence_ordered(), ModelSQL, ModelView):
class MoveLineTemplate(ModelSQL, ModelView):
'Account Move Line Template'
__name__ = 'account.move.line.template'
move = fields.Many2One(
'account.move.template', "Move", required=True, ondelete='CASCADE')
@@ -288,7 +285,6 @@ class MoveLineTemplate(ModelSQL, ModelView):
class TaxLineTemplate(ModelSQL, ModelView):
'Account Tax Line Template'
__name__ = 'account.tax.line.template'
line = fields.Many2One(
'account.move.line.template', "Line",
@@ -370,7 +366,6 @@ class KeywordStateView(StateView):
class CreateMove(Wizard):
'Create Move from Template'
__name__ = 'account.move.template.create'
start = StateTransition()
template = StateView('account.move.template.create.template',
@@ -426,7 +421,6 @@ class CreateMove(Wizard):
class CreateMoveTemplate(ModelView):
'Create Move from Template'
__name__ = 'account.move.template.create.template'
template = fields.Many2One('account.move.template', 'Template',
required=True,
@@ -493,6 +487,5 @@ class CreateMoveTemplate(ModelView):
class CreateMoveKeywords(ModelView):
'Create Move from Template'
__no_slots__ = True
__name__ = 'account.move.template.create.keywords'
-1
View File
@@ -288,7 +288,6 @@ class Party(CompanyMultiValueMixin, metaclass=PoolMeta):
class PartyAccount(ModelSQL, CompanyValueMixin):
"Party Account"
__name__ = 'party.party.account'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE',
-1
View File
@@ -23,7 +23,6 @@ _STATES = {
class Period(Workflow, ModelSQL, ModelView):
'Period'
__name__ = 'account.period'
name = fields.Char('Name', required=True)
start_date = fields.Date('Starting Date', required=True, states=_STATES,
+4 -24
View File
@@ -34,7 +34,6 @@ KINDS = [
class TaxGroup(ModelSQL, ModelView):
'Tax Group'
__name__ = 'account.tax.group'
name = fields.Char('Name', size=None, required=True)
code = fields.Char('Code', size=None, required=True)
@@ -46,7 +45,6 @@ class TaxGroup(ModelSQL, ModelView):
class TaxCodeTemplate(PeriodMixin, tree(), ModelSQL, ModelView):
'Tax Code Template'
__name__ = 'account.tax.code.template'
name = fields.Char('Name', required=True)
code = fields.Char('Code')
@@ -125,7 +123,6 @@ class TaxCodeTemplate(PeriodMixin, tree(), ModelSQL, ModelView):
class TaxCode(
ContextCompanyMixin, ActivePeriodMixin, tree(), ModelSQL, ModelView):
'Tax Code'
__name__ = 'account.tax.code'
_states = {
'readonly': (Bool(Eval('template', -1))
@@ -307,7 +304,6 @@ class TaxCode(
class TaxCodeLineTemplate(ModelSQL, ModelView):
"Tax Code Line Template"
__name__ = 'account.tax.code.line.template'
code = fields.Many2One('account.tax.code.template', "Code", required=True)
@@ -365,7 +361,6 @@ class TaxCodeLineTemplate(ModelSQL, ModelView):
class TaxCodeLine(ModelSQL, ModelView):
"Tax Code Line"
__name__ = 'account.tax.code.line'
_states = {
'readonly': (Bool(Eval('template', -1))
@@ -476,7 +471,6 @@ class TaxCodeLine(ModelSQL, ModelView):
class TaxCodeContext(ModelView):
"Tax Code Context"
__name__ = 'account.tax.code.context'
company = fields.Many2One('company.company', "Company", required=True)
@@ -590,7 +584,6 @@ class TaxCodeContext(ModelView):
class TaxTemplate(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin):
'Account Tax Template'
__name__ = 'account.tax.template'
name = fields.Char('Name', required=True)
description = fields.Char('Description', required=True)
@@ -750,14 +743,10 @@ class TaxTemplate(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin):
class Tax(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin):
'''
Account Tax
Type:
percentage: tax = price * rate
fixed: tax = amount
none: tax = none
'''
"""Type:
percentage: tax = price * rate
fixed: tax = amount
none: tax = none"""
__name__ = 'account.tax'
_states = {
'readonly': (Bool(Eval('template', -1))
@@ -1308,7 +1297,6 @@ class TaxableMixin(object):
class TaxLine(ModelSQL, ModelView):
'Tax Line'
__name__ = 'account.tax.line'
currency = fields.Function(fields.Many2One(
'currency.currency', "Currency"),
@@ -1426,7 +1414,6 @@ class TaxLine(ModelSQL, ModelView):
class TaxRuleTemplate(ModelSQL, ModelView):
'Tax Rule Template'
__name__ = 'account.tax.rule.template'
name = fields.Char('Name', required=True)
kind = fields.Selection(KINDS, 'Kind', required=True)
@@ -1484,7 +1471,6 @@ class TaxRuleTemplate(ModelSQL, ModelView):
class TaxRule(ModelSQL, ModelView):
'Tax Rule'
__name__ = 'account.tax.rule'
_states = {
'readonly': (Bool(Eval('template', -1))
@@ -1564,7 +1550,6 @@ class TaxRule(ModelSQL, ModelView):
class TaxRuleLineTemplate(sequence_ordered(), ModelSQL, ModelView):
'Tax Rule Line Template'
__name__ = 'account.tax.rule.line.template'
rule = fields.Many2One('account.tax.rule.template', 'Rule', required=True,
ondelete='CASCADE')
@@ -1681,7 +1666,6 @@ class TaxRuleLineTemplate(sequence_ordered(), ModelSQL, ModelView):
class TaxRuleLine(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
'Tax Rule Line'
__name__ = 'account.tax.rule.line'
_states = {
'readonly': (Bool(Eval('template', -1))
@@ -1838,7 +1822,6 @@ class TaxRuleLine(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
class OpenTaxCode(Wizard):
'Open Code'
__name__ = 'account.tax.open_code'
start_state = 'open_'
open_ = StateAction('account.act_tax_line_form')
@@ -1860,7 +1843,6 @@ class OpenTaxCode(Wizard):
class TestTax(Wizard):
"Test Tax"
__name__ = 'account.tax.test'
start_state = 'test'
test = StateView(
@@ -1877,7 +1859,6 @@ class TestTax(Wizard):
class TestTaxView(ModelView, TaxableMixin):
"Test Tax"
__name__ = 'account.tax.test'
tax_date = fields.Date("Date")
taxes = fields.One2Many('account.tax', None, "Taxes",
@@ -1935,7 +1916,6 @@ class TestTaxView(ModelView, TaxableMixin):
class TestTaxViewResult(ModelView):
"Test Tax"
__name__ = 'account.tax.test.result'
tax = fields.Many2One('account.tax', "Tax")
description = fields.Char("Description")
-3
View File
@@ -84,7 +84,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationAssetSequence(ModelSQL, CompanyValueMixin):
"Account Configuration Asset Sequence"
__name__ = 'account.configuration.asset_sequence'
asset_sequence = fields.Many2One(
'ir.sequence', "Asset Reference Sequence", required=True,
@@ -105,7 +104,6 @@ class ConfigurationAssetSequence(ModelSQL, CompanyValueMixin):
class ConfigurationAssetDate(ModelSQL, CompanyValueMixin):
"Account Configuration Asset Date"
__name__ = 'account.configuration.asset_date'
asset_bymonthday = asset_bymonthday
asset_bymonth = asset_bymonth
@@ -120,7 +118,6 @@ class ConfigurationAssetDate(ModelSQL, CompanyValueMixin):
class ConfigurationAssetFrequency(ModelSQL, CompanyValueMixin):
"Account Configuration Asset Frequency"
__name__ = 'account.configuration.asset_frequency'
asset_frequency = asset_frequency
get_asset_frequencies = get_asset_selection('frequency')
-11
View File
@@ -51,7 +51,6 @@ def normalized_delta(start, end):
class Asset(Workflow, ModelSQL, ModelView):
'Asset'
__name__ = 'account.asset'
_rec_name = 'number'
number = fields.Char("Number", readonly=True)
@@ -723,7 +722,6 @@ class Asset(Workflow, ModelSQL, ModelView):
class AssetLine(ModelSQL, ModelView):
'Asset Line'
__name__ = 'account.asset.line'
asset = fields.Many2One('account.asset', 'Asset', required=True,
ondelete='CASCADE', readonly=True)
@@ -758,7 +756,6 @@ class AssetLine(ModelSQL, ModelView):
class AssetUpdateMove(ModelSQL):
'Asset - Update - Move'
__name__ = 'account.asset-update-account.move'
asset = fields.Many2One(
'account.asset', "Asset", ondelete='CASCADE', required=True)
@@ -766,7 +763,6 @@ class AssetUpdateMove(ModelSQL):
class CreateMovesStart(ModelView):
'Create Moves Start'
__name__ = 'account.asset.create_moves.start'
date = fields.Date('Date')
@@ -777,7 +773,6 @@ class CreateMovesStart(ModelView):
class CreateMoves(Wizard):
'Create Moves'
__name__ = 'account.asset.create_moves'
start = StateView('account.asset.create_moves.start',
'account_asset.asset_create_moves_start_view_form', [
@@ -800,7 +795,6 @@ class CreateMoves(Wizard):
class UpdateAssetShowDepreciation(ModelView):
'Update Asset Show Depreciation'
__name__ = 'account.asset.update.show_depreciation'
amount = fields.Numeric('Amount', readonly=True)
date = fields.Date('Date', required=True,
@@ -820,7 +814,6 @@ class UpdateAssetShowDepreciation(ModelView):
class UpdateAsset(Wizard):
'Update Asset'
__name__ = 'account.asset.update'
start = StateView('account.asset.revision',
'account_asset.asset_revision_view_form', [
@@ -935,7 +928,6 @@ class UpdateAsset(Wizard):
class AssetRevision(ModelSQL, ModelView):
"Asset Revision"
__name__ = 'account.asset.revision'
currency = fields.Function(
fields.Many2One('currency.currency', "Currency"),
@@ -983,7 +975,6 @@ class AssetRevision(ModelSQL, ModelView):
class AssetDepreciationTable(CompanyReport):
'Asset Depreciation Table'
__name__ = 'account.asset.depreciation_table'
@classmethod
@@ -1147,7 +1138,6 @@ class AssetDepreciationTable(CompanyReport):
class PrintDepreciationTableStart(ModelView):
'Asset Depreciation Table Start'
__name__ = 'account.asset.print_depreciation_table.start'
start_date = fields.Date('Start Date', required=True,
@@ -1165,7 +1155,6 @@ class PrintDepreciationTableStart(ModelView):
class PrintDepreciationTable(Wizard):
'Asset Depreciation Table'
__name__ = 'account.asset.print_depreciation_table'
start = StateView('account.asset.print_depreciation_table.start',
'account_asset.print_depreciation_table_start_view_form', [
-2
View File
@@ -33,7 +33,6 @@ class CreateChart(metaclass=PoolMeta):
class BEVATCustomer(ModelSQL, ModelView):
"Belgian VAT Customer"
__name__ = 'account.be.vat_customer'
company_tax_identifier = fields.Many2One(
@@ -118,7 +117,6 @@ class BEVATCustomer(ModelSQL, ModelView):
class BEVATCustomerContext(ModelView):
"Belgian VAT Customer Context"
__name__ = 'account.be.vat_customer.context'
company = fields.Many2One('company.company', "Company", required=True)
-8
View File
@@ -254,7 +254,6 @@ class BudgetLineMixin(
class BudgetContext(ModelView):
"Account Budget Context"
__name__ = 'account.budget.context'
budget = fields.Many2One('account.budget', "Budget", required=True)
@@ -298,7 +297,6 @@ class BudgetContext(ModelView):
class Budget(BudgetMixin, ModelSQL, ModelView):
"Account Budget"
__name__ = 'account.budget'
fiscalyear = fields.Many2One(
@@ -438,7 +436,6 @@ class Budget(BudgetMixin, ModelSQL, ModelView):
class BudgetLine(BudgetLineMixin, ModelSQL, ModelView):
"Account Budget Line"
__name__ = 'account.budget.line'
budget = fields.Many2One(
@@ -610,7 +607,6 @@ class BudgetLine(BudgetLineMixin, ModelSQL, ModelView):
class BudgetLinePeriod(AmountMixin, ModelSQL, ModelView):
"Account Budget Line Period"
__name__ = 'account.budget.line.period'
budget_line = fields.Many2One(
@@ -794,7 +790,6 @@ class CopyBudgetStartMixin:
class CopyBudget(CopyBudgetMixin, Wizard):
"Copy Budget"
__name__ = 'account.budget.copy'
start = StateView('account.budget.copy.start',
@@ -816,7 +811,6 @@ class CopyBudget(CopyBudgetMixin, Wizard):
class CopyBudgetStart(CopyBudgetStartMixin, ModelView):
"Copy Budget"
__name__ = 'account.budget.copy.start'
fiscalyear = fields.Many2One(
@@ -828,7 +822,6 @@ class CopyBudgetStart(CopyBudgetStartMixin, ModelView):
class CreatePeriods(Wizard):
"Create Periods"
__name__ = 'account.budget.line.create_periods'
start = StateView('account.budget.line.create_periods.start',
@@ -852,7 +845,6 @@ class CreatePeriods(Wizard):
class CreatePeriodsStart(ModelView):
"Create Periods"
__name__ = 'account.budget.line.create_periods.start'
method = fields.Selection([
-1
View File
@@ -49,7 +49,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationCashRoundingAccount(ModelSQL, CompanyValueMixin):
"Account Configuration Cash Rounding Account"
__name__ = 'account.configuration.cash_rounding_account'
cash_rounding = fields.Boolean("Cash Rounding")
-3
View File
@@ -145,7 +145,6 @@ class Invoice(metaclass=PoolMeta):
class Consolidation(
sequence_ordered(), tree(separator='\\'), ModelSQL, ModelView):
"Account Consolidation"
__name__ = 'account.consolidation'
parent = fields.Many2One(
@@ -293,7 +292,6 @@ class Consolidation(
class ConsolidationBalanceSheetContext(ModelView):
"Consolidation Balance Sheet Context"
__name__ = 'account.consolidation.balance_sheet.context'
date = fields.Date("Date", required=True)
posted = fields.Boolean("Posted Moves", help="Only include posted moves.")
@@ -352,7 +350,6 @@ class ConsolidationBalanceSheetContext(ModelView):
class ConsolidationIncomeStatementContext(ModelView):
"Consolidation Income Statement Context"
__name__ = 'account.consolidation.income_statement.context'
from_date = fields.Date(
"From Date",
-1
View File
@@ -31,7 +31,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationDefaultCreditLimitAmount(ModelSQL, CompanyValueMixin):
"Account Configuration Default Credit Limit Amount"
__name__ = 'account.configuration.default_credit_limit_amount'
default_credit_limit_amount = default_credit_limit_amount
default_credit_limit_amount_digits = fields.Function(
-1
View File
@@ -120,7 +120,6 @@ class Party(metaclass=PoolMeta):
class PartyCreditLimitAmount(ModelSQL, CompanyValueMixin):
"Party Credit Limit Amount"
__name__ = 'party.party.credit_limit_amount'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE',
-2
View File
@@ -117,7 +117,6 @@ class InvoiceLine(metaclass=PoolMeta):
class DepositRecall(Wizard):
'Recall deposit on Invoice'
__name__ = 'account.invoice.recall_deposit'
start = StateView('account.invoice.recall_deposit.start',
'account_deposit.recall_deposit_start_view_form', [
@@ -138,7 +137,6 @@ class DepositRecall(Wizard):
class DepositRecallStart(ModelView):
'Recall deposit on Invoice'
__name__ = 'account.invoice.recall_deposit.start'
company = fields.Many2One('company.company', 'Company', readonly=True)
currency = fields.Many2One('currency.currency', "Currency", readonly=True)
-1
View File
@@ -14,7 +14,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationDefaultDunningProcedure(ModelSQL, ValueMixin):
"Account Configuration Default Dunning Procedure"
__name__ = 'account.configuration.default_dunning_procedure'
default_dunning_procedure = default_dunning_procedure
-8
View File
@@ -16,7 +16,6 @@ from trytond.wizard import (
class Procedure(ModelSQL, ModelView):
'Account Dunning Procedure'
__name__ = 'account.dunning.procedure'
name = fields.Char('Name', required=True, translate=True,
help="The main identifier of the Dunning Procedure.")
@@ -29,7 +28,6 @@ class Procedure(ModelSQL, ModelView):
class Level(sequence_ordered(), ModelSQL, ModelView):
'Account Dunning Level'
__name__ = 'account.dunning.level'
procedure = fields.Many2One(
'account.dunning.procedure', "Procedure", required=True)
@@ -51,7 +49,6 @@ _STATES = {
class Dunning(ModelSQL, ModelView):
'Account Dunning'
__name__ = 'account.dunning'
company = fields.Many2One(
'company.company', "Company", required=True, states=_STATES,
@@ -310,7 +307,6 @@ class Dunning(ModelSQL, ModelView):
class CreateDunningStart(ModelView):
'Create Account Dunning'
__name__ = 'account.dunning.create.start'
date = fields.Date('Date', required=True,
help="Create dunning up to this date.")
@@ -322,7 +318,6 @@ class CreateDunningStart(ModelView):
class CreateDunning(Wizard):
'Create Account Dunning'
__name__ = 'account.dunning.create'
start = StateView('account.dunning.create.start',
'account_dunning.dunning_create_start_view_form', [
@@ -339,12 +334,10 @@ class CreateDunning(Wizard):
class ProcessDunningStart(ModelView):
'Create Account Dunning'
__name__ = 'account.dunning.process.start'
class ProcessDunning(Wizard):
'Process Account Dunning'
__name__ = 'account.dunning.process'
start = StateView('account.dunning.process.start',
'account_dunning.dunning_process_start_view_form', [
@@ -375,7 +368,6 @@ class ProcessDunning(Wizard):
class RescheduleDunning(Wizard):
"Reschedule Account Dunning"
__name__ = 'account.dunning.reschedule'
start = StateAction('account.act_reschedule_lines_wizard')
-1
View File
@@ -24,7 +24,6 @@ class Party(metaclass=PoolMeta):
class PartyDunningProcedure(ModelSQL, ValueMixin):
"Party Dunning Procedure"
__name__ = 'party.party.dunning_procedure'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE')
-2
View File
@@ -10,7 +10,6 @@ from trytond.transaction import Transaction
class Fee(DeactivableMixin, ModelSQL, ModelView):
'Account Dunning Fee'
__name__ = 'account.dunning.fee'
name = fields.Char('Name', required=True, translate=True)
product = fields.Many2One('product.product', 'Product', required=True,
@@ -83,7 +82,6 @@ class Dunning(metaclass=PoolMeta):
class FeeDunningLevel(ModelSQL, ModelView):
'Account Dunning Fee Dunning-Level'
__name__ = 'account.dunning.fee.dunning_level'
dunning = fields.Many2One(
-8
View File
@@ -334,7 +334,6 @@ class AEAT303(AEATReport):
class PrintAEATStart(ModelView):
'Print AEAT Start'
__name__ = 'account.reporting.aeat.start'
report = fields.Selection([
@@ -347,7 +346,6 @@ class PrintAEATStart(ModelView):
class PrintAEAT(Wizard):
'Print AEAT'
__name__ = 'account.reporting.aeat'
start = StateView('account.reporting.aeat.start',
'account_es.print_aeat_start_view_form', [
@@ -379,7 +377,6 @@ class PrintAEAT(Wizard):
class ESVATList(ModelSQL, ModelView):
"Spanish VAT List"
__name__ = 'account.reporting.vat_list_es'
company_tax_identifier = fields.Many2One(
@@ -510,7 +507,6 @@ class ESVATList(ModelSQL, ModelView):
class ESVATListContext(ModelView):
"Spanish VAT List Context"
__name__ = 'account.reporting.vat_list_es.context'
company = fields.Many2One('company.company', "Company", required=True)
@@ -561,7 +557,6 @@ class AEAT347(Report):
class ECOperationList(ECSalesList):
"EC Operation List"
__name__ = 'account.reporting.es_ec_operation_list'
@classmethod
@@ -633,7 +628,6 @@ class ECOperationList(ECSalesList):
class ECOperationListContext(ECSalesListContext):
"EC Operation List Context"
__name__ = 'account.reporting.es_ec_operation_list.context'
start_date = fields.Date("Start Date",
@@ -713,7 +707,6 @@ class AEAT349(Report):
class ESVATBookContext(ModelView):
"Spanish VAT Book Context"
__name__ = 'account.reporting.vat_book_es.context'
company = fields.Many2One('company.company', "Company", required=True)
@@ -761,7 +754,6 @@ class ESVATBookContext(ModelView):
class ESVATBook(ModelSQL, ModelView):
"Spanish VAT Book"
__name__ = 'account.reporting.vat_book_es'
invoice = fields.Many2One('account.invoice', "Invoice")
-2
View File
@@ -66,7 +66,6 @@ class Configuration(metaclass=PoolMeta):
class CredentialSII(ModelSQL, CompanyValueMixin):
"Account Credential SII"
__name__ = 'account.credential.sii'
es_sii_url = fields.Selection(SII_URL, "SII URL", translate=False)
@@ -256,7 +255,6 @@ class Invoice(metaclass=PoolMeta):
class InvoiceSII(ModelSQL, ModelView):
"Invoice SII"
__name__ = 'account.invoice.sii'
invoice = fields.Many2One(
-2
View File
@@ -35,7 +35,6 @@ class Tax(metaclass=PoolMeta):
class ECSalesList(ModelSQL, ModelView):
"EC Sales List"
__name__ = 'account.ec_sales_list'
company_tax_identifier = fields.Many2One(
@@ -109,7 +108,6 @@ class ECSalesList(ModelSQL, ModelView):
class ECSalesListContext(ModelView):
"EC Sales List Context"
__name__ = 'account.ec_sales_list.context'
company = fields.Many2One('company.company', "Company", required=True)
-2
View File
@@ -42,7 +42,6 @@ class Configuration(_ExportTypes, metaclass=PoolMeta):
class ConfigurationExport(_ExportTypes, ModelSQL, CompanyValueMixin):
"Account Configuration Export"
__name__ = 'account.configuration.export'
move_export_type = fields.Selection(
@@ -71,7 +70,6 @@ class Move(metaclass=PoolMeta):
class MoveExport(Workflow, ModelSQL, ModelView):
"Account Move Export"
__name__ = 'account.move.export'
company = fields.Many2One('company.company', "Company", required=True)
-3
View File
@@ -67,7 +67,6 @@ class CreateChart(metaclass=PoolMeta):
class FrFEC(Wizard):
'Generate FEC'
__name__ = 'account.fr.fec'
start = StateView('account.fr.fec.start',
@@ -307,7 +306,6 @@ class FrFEC(Wizard):
class FrFECStart(ModelView):
'Generate FEC'
__name__ = 'account.fr.fec.start'
fiscalyear = fields.Many2One(
@@ -330,7 +328,6 @@ class FrFECStart(ModelView):
class FrFECResult(ModelView):
'Generate FEC'
__name__ = 'account.fr.fec.result'
file = fields.Binary('File', readonly=True, filename='filename')
-2
View File
@@ -103,7 +103,6 @@ class Configuration(_SyntaxMixin, metaclass=PoolMeta):
class CredentialChorus(ModelSQL, CompanyValueMixin):
"Account Credential Chorus"
__name__ = 'account.credential.chorus'
chorus_piste_client_id = fields.Char("Piste Client ID", strip=False)
@@ -205,7 +204,6 @@ class Invoice(metaclass=PoolMeta):
class InvoiceChorus(
Workflow, ModelSQL, ModelView, _SyntaxMixin, metaclass=PoolMeta):
"Invoice Chorus"
__name__ = 'account.invoice.chorus'
_history = True
-2
View File
@@ -32,7 +32,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationDefaultPaymentTerm(ModelSQL, CompanyValueMixin):
"Account Configuration Default Payment Term"
__name__ = 'account.configuration.default_payment_term'
default_customer_payment_term = fields.Many2One(
@@ -81,7 +80,6 @@ class Period(metaclass=PoolMeta):
class InvoiceSequence(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
'Invoice Sequence'
__name__ = 'account.fiscalyear.invoice_sequence'
company = fields.Many2One('company.company', "Company", required=True)
fiscalyear = fields.Many2One(
-17
View File
@@ -60,7 +60,6 @@ class InvoiceReportMixin:
class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
'Invoice'
__name__ = 'account.invoice'
_rec_name = 'number'
_order_name = 'number'
@@ -2123,7 +2122,6 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
class InvoiceAdditionalMove(ModelSQL):
"Invoice Additional Move"
__name__ = 'account.invoice-additional-account.move'
invoice = fields.Many2One(
'account.invoice', "Invoice", ondelete='CASCADE', required=True)
@@ -2132,7 +2130,6 @@ class InvoiceAdditionalMove(ModelSQL):
class AlternativePayee(ModelSQL):
"Invoice Alternative Payee"
__name__ = 'account.invoice.alternative_payee'
invoice = fields.Many2One(
@@ -2142,7 +2139,6 @@ class AlternativePayee(ModelSQL):
class InvoicePaymentLine(ModelSQL):
'Invoice - Payment Line'
__name__ = 'account.invoice-account.move.line'
invoice = fields.Many2One(
'account.invoice', "Invoice", ondelete='CASCADE', required=True)
@@ -2199,7 +2195,6 @@ class InvoicePaymentLine(ModelSQL):
class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
'Invoice Line'
__name__ = 'account.invoice.line'
_states = {
'readonly': Eval('invoice_state') != 'draft',
@@ -2962,7 +2957,6 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
class InvoiceLineTax(ModelSQL):
'Invoice Line - Tax'
__name__ = 'account.invoice.line-account.tax'
line = fields.Many2One(
'account.invoice.line', "Invoice Line",
@@ -2988,7 +2982,6 @@ class InvoiceLineTax(ModelSQL):
class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
'Invoice Tax'
__name__ = 'account.invoice.tax'
_rec_name = 'description'
_states = {
@@ -3275,7 +3268,6 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
class PaymentMethod(DeactivableMixin, ModelSQL, ModelView):
'Payment Method'
__name__ = 'account.invoice.payment.method'
company = fields.Many2One('company.company', "Company", required=True)
name = fields.Char("Name", required=True, translate=True)
@@ -3312,7 +3304,6 @@ class PaymentMethod(DeactivableMixin, ModelSQL, ModelView):
class InvoiceReportRevision(ModelSQL, ModelView, InvoiceReportMixin):
"Invoice Report Revision"
__name__ = 'account.invoice.report.revision'
invoice = fields.Many2One(
'account.invoice', "Invoice", required=True, ondelete='CASCADE')
@@ -3358,7 +3349,6 @@ class InvoiceReportRevision(ModelSQL, ModelView, InvoiceReportMixin):
class RefreshInvoiceReport(Wizard):
"Refresh Invoice Report"
__name__ = 'account.invoice.refresh_invoice_report'
start_state = 'archive'
archive = StateTransition()
@@ -3429,7 +3419,6 @@ class InvoiceReport(Report):
class PayInvoiceStart(ModelView):
'Pay Invoice'
__name__ = 'account.invoice.pay.start'
payee = fields.Many2One(
@@ -3471,7 +3460,6 @@ class PayInvoiceStart(ModelView):
class PayInvoiceAsk(ModelView):
'Pay Invoice'
__name__ = 'account.invoice.pay.ask'
type = fields.Selection([
('writeoff', "Write-Off"),
@@ -3552,7 +3540,6 @@ class PayInvoiceAsk(ModelView):
class PayInvoice(Wizard):
'Pay Invoice'
__name__ = 'account.invoice.pay'
start = StateView('account.invoice.pay.start',
'account_invoice.pay_start_view_form', [
@@ -3703,7 +3690,6 @@ class PayInvoice(Wizard):
class CreditInvoiceStart(ModelView):
'Credit Invoice'
__name__ = 'account.invoice.credit.start'
invoice_date = fields.Date("Invoice Date")
with_refund = fields.Boolean('With Refund',
@@ -3716,7 +3702,6 @@ class CreditInvoiceStart(ModelView):
class CreditInvoice(Wizard):
'Credit Invoice'
__name__ = 'account.invoice.credit'
start = StateView('account.invoice.credit.start',
'account_invoice.credit_start_view_form', [
@@ -3757,7 +3742,6 @@ class CreditInvoice(Wizard):
class RescheduleLinesToPay(Wizard):
"Reschedule Lines to Pay"
__name__ = 'account.invoice.lines_to_pay.reschedule'
start = StateAction('account.act_reschedule_lines_wizard')
@@ -3771,7 +3755,6 @@ class RescheduleLinesToPay(Wizard):
class DelegateLinesToPay(Wizard):
"Delegate Lines to Pay"
__name__ = 'account.invoice.lines_to_pay.delegate'
start = StateAction('account.act_delegate_lines_wizard')
-1
View File
@@ -55,7 +55,6 @@ class Party(metaclass=PoolMeta):
class PartyPaymentTerm(ModelSQL, ValueMixin):
"Party Payment Term"
__name__ = 'party.party.payment_term'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE')
-6
View File
@@ -18,7 +18,6 @@ from .exceptions import PaymentTermComputeError, PaymentTermValidationError
class PaymentTerm(DeactivableMixin, ModelSQL, ModelView):
'Payment Term'
__name__ = 'account.invoice.payment_term'
name = fields.Char('Name', size=None, required=True, translate=True)
description = fields.Text('Description', translate=True)
@@ -81,7 +80,6 @@ class PaymentTerm(DeactivableMixin, ModelSQL, ModelView):
class PaymentTermLine(sequence_ordered(), ModelSQL, ModelView):
'Payment Term Line'
__name__ = 'account.invoice.payment_term.line'
payment = fields.Many2One('account.invoice.payment_term', 'Payment Term',
required=True, ondelete="CASCADE")
@@ -221,7 +219,6 @@ class PaymentTermLine(sequence_ordered(), ModelSQL, ModelView):
class PaymentTermLineRelativeDelta(sequence_ordered(), ModelSQL, ModelView):
'Payment Term Line Relative Delta'
__name__ = 'account.invoice.payment_term.line.delta'
line = fields.Many2One('account.invoice.payment_term.line',
'Payment Term Line', required=True, ondelete='CASCADE')
@@ -310,7 +307,6 @@ class PaymentTermLineRelativeDelta(sequence_ordered(), ModelSQL, ModelView):
class TestPaymentTerm(Wizard):
'Test Payment Term'
__name__ = 'account.invoice.payment_term.test'
start_state = 'test'
test = StateView('account.invoice.payment_term.test',
@@ -326,7 +322,6 @@ class TestPaymentTerm(Wizard):
class TestPaymentTermView(ModelView):
'Test Payment Term'
__name__ = 'account.invoice.payment_term.test'
payment_term = fields.Many2One('account.invoice.payment_term',
'Payment Term', required=True)
@@ -365,7 +360,6 @@ class TestPaymentTermView(ModelView):
class TestPaymentTermViewResult(ModelView):
'Test Payment Term'
__name__ = 'account.invoice.payment_term.test.result'
date = fields.Date('Date', readonly=True)
amount = Monetary(
@@ -29,7 +29,6 @@ class Invoice(metaclass=PoolMeta):
class InvoiceCorrectStart(ModelView):
"Correct Invoice"
__name__ = 'account.invoice.correct.start'
invoice = fields.Many2One('account.invoice', 'Invoice', readonly=True)
@@ -42,7 +41,6 @@ class InvoiceCorrectStart(ModelView):
class InvoiceCorrect(Wizard):
"Correct Invoice"
__name__ = 'account.invoice.correct'
start = StateView('account.invoice.correct.start',
-2
View File
@@ -54,7 +54,6 @@ class ConfigurationDefaultAccount(metaclass=PoolMeta):
class InvoiceDeferred(Workflow, ModelSQL, ModelView):
"Invoice Deferred"
__name__ = 'account.invoice.deferred'
_states = {
@@ -388,7 +387,6 @@ class InvoiceDeferred(Workflow, ModelSQL, ModelView):
class InvoiceDeferredCreateMoves(Wizard):
"Invoice Deferred Create Moves"
__name__ = 'account.invoice.deferred.create_moves'
start_state = 'create_moves'
create_moves = StateTransition()
-1
View File
@@ -32,7 +32,6 @@ class Invoice(metaclass=PoolMeta):
class InvoiceLineStockMove(ModelSQL):
'Invoice Line - Stock Move'
__name__ = 'account.invoice.line-stock.move'
invoice_line = fields.Many2One(
@@ -37,7 +37,6 @@ class MoveLine(metaclass=PoolMeta):
class MoveLineGroup(MoveLineMixin, ModelSQL, ModelView):
"Account Move Line Group"
__name__ = 'account.move.line.group'
move = fields.Many2One('account.move', "Move", readonly=True)
@@ -216,7 +215,6 @@ class MoveLineGroup(MoveLineMixin, ModelSQL, ModelView):
class MoveLineGroup_MoveLine(ModelSQL):
"Account Move Line Group - Move Line"
__name__ = 'account.move.line.group-move.line'
group = fields.Many2One('account.move.line.group', "Group")
-7
View File
@@ -338,7 +338,6 @@ class MoveLine(metaclass=PoolMeta):
class CreateDirectDebit(Wizard):
"Create Direct Debit"
__name__ = 'account.move.line.create_direct_debit'
start = StateView('account.move.line.create_direct_debit.start',
@@ -359,7 +358,6 @@ class CreateDirectDebit(Wizard):
class CreateDirectDebitStart(ModelView):
"Create Direct Debit"
__name__ = 'account.move.line.create_direct_debit.start'
date = fields.Date(
@@ -372,7 +370,6 @@ class CreateDirectDebitStart(ModelView):
class PayLineStart(ModelView):
"Pay Line"
__name__ = 'account.move.line.pay.start'
date = fields.Date(
"Date",
@@ -381,7 +378,6 @@ class PayLineStart(ModelView):
class PayLineAskJournal(ModelView):
'Pay Line'
__name__ = 'account.move.line.pay.ask_journal'
company = fields.Many2One('company.company', 'Company', readonly=True)
currency = fields.Many2One('currency.currency', 'Currency', readonly=True)
@@ -396,7 +392,6 @@ class PayLineAskJournal(ModelView):
class PayLine(Wizard):
'Pay Line'
__name__ = 'account.move.line.pay'
start = StateView(
'account.move.line.pay.start',
@@ -590,7 +585,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationPaymentSequence(ModelSQL, CompanyValueMixin):
"Account Configuration Payment Sequence"
__name__ = 'account.configuration.payment_sequence'
payment_sequence = fields.Many2One(
'ir.sequence', "Payment Sequence", required=True,
@@ -612,7 +606,6 @@ class ConfigurationPaymentSequence(ModelSQL, CompanyValueMixin):
class ConfigurationPaymentGroupSequence(ModelSQL, CompanyValueMixin):
"Account Configuration Payment Group Sequence"
__name__ = 'account.configuration.payment_group_sequence'
payment_group_sequence = fields.Many2One(
'ir.sequence', "Payment Group Sequence", required=True,
-2
View File
@@ -47,7 +47,6 @@ class Party(metaclass=PoolMeta):
class PartyPaymentDirectDebit(ModelSQL, CompanyValueMixin):
"Party Payment Direct Debit"
__name__ = 'party.party.payment_direct_debit'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE',
@@ -60,7 +59,6 @@ class PartyPaymentDirectDebit(ModelSQL, CompanyValueMixin):
class PartyReceptionDirectDebit(
sequence_ordered(), MatchMixin, ModelView, ModelSQL):
"Party Reception Direct Debit"
__name__ = 'party.party.reception_direct_debit'
party = fields.Many2One(
-4
View File
@@ -34,7 +34,6 @@ KINDS = [
class Journal(DeactivableMixin, ModelSQL, ModelView):
'Payment Journal'
__name__ = 'account.payment.journal'
name = fields.Char('Name', required=True)
currency = fields.Many2One('currency.currency', 'Currency', required=True)
@@ -61,7 +60,6 @@ class Journal(DeactivableMixin, ModelSQL, ModelView):
class Group(ModelSQL, ModelView):
'Payment Group'
__name__ = 'account.payment.group'
_rec_name = 'number'
number = fields.Char('Number', required=True, readonly=True)
@@ -271,7 +269,6 @@ _STATES = {
class Payment(Workflow, ModelSQL, ModelView):
'Payment'
__name__ = 'account.payment'
_rec_name = 'number'
number = fields.Char("Number", required=True, readonly=True)
@@ -713,7 +710,6 @@ class Payment(Workflow, ModelSQL, ModelView):
class ProcessPayment(Wizard):
'Process Payment'
__name__ = 'account.payment.process'
start_state = 'process'
process = StateAction('account_payment.act_payment_group_form')
@@ -533,7 +533,6 @@ class Payment(CheckoutMixin, BraintreeCustomerMethodMixin, metaclass=PoolMeta):
class PaymentBraintreeRefund(Workflow, ModelSQL, ModelView):
"Braintree Payment Refund"
__name__ = 'account.payment.braintree.refund'
payment = fields.Many2One(
@@ -779,7 +778,6 @@ class PaymentBraintreeRefund(Workflow, ModelSQL, ModelView):
class PaymentBraintreeAccount(ModelSQL, ModelView):
"Braintree Account"
__name__ = 'account.payment.braintree.account'
name = fields.Char("Name", required=True)
@@ -932,7 +930,6 @@ class PaymentBraintreeAccount(ModelSQL, ModelView):
class PaymentBraintreeCustomer(
CheckoutMixin, DeactivableMixin, ModelSQL, ModelView):
"Braintree Customer"
__name__ = 'account.payment.braintree.customer'
_history = True
_rec_name = 'braintree_customer_id'
@@ -1201,7 +1198,6 @@ class PaymentBraintreeCustomer(
class PaymentBraintreeCustomerIdentical(ModelSQL):
"Braintree Customer Identical"
__name__ = 'account.payment.braintree.customer.identical'
source = fields.Many2One('account.payment.braintree.customer', "Source")
target = fields.Many2One('account.payment.braintree.customer', "Target")
@@ -1229,7 +1225,6 @@ class PaymentBraintreeCustomerIdentical(ModelSQL):
class PaymentBraintreeCustomerPaymentMethodDelete(Wizard):
"Delete Customer Payment Method"
__name__ = 'account.payment.braintree.customer.payment_method.delete'
start_state = 'ask'
ask = StateView(
@@ -1253,7 +1248,6 @@ class PaymentBraintreeCustomerPaymentMethodDelete(Wizard):
class PaymentBraintreeCustomerPaymentMethodDeleteAsk(ModelView):
"Delete Customer Payment Method"
__name__ = 'account.payment.braintree.customer.payment_method.delete.ask'
customer = fields.Many2One(
@@ -1270,7 +1264,6 @@ class PaymentBraintreeCustomerPaymentMethodDeleteAsk(ModelView):
class PaymentBraintreeCheckout(Wizard):
"Braintree Checkout"
__name__ = 'account.payment.braintree.checkout'
start_state = 'checkout'
checkout = StateAction('account_payment_braintree.url_checkout')
@@ -1281,5 +1274,4 @@ class PaymentBraintreeCheckout(Wizard):
class PaymentBraintreeCheckoutPage(Report):
"Braintree Checkout"
__name__ = 'account.payment.braintree.checkout'
@@ -443,7 +443,6 @@ class Group(metaclass=PoolMeta):
class Succeed(Wizard):
"Succeed Payment"
__name__ = 'account.payment.succeed'
start = StateView('account.payment.succeed.start',
'account_payment_clearing.succeed_start_view_form', [
@@ -459,7 +458,6 @@ class Succeed(Wizard):
class SucceedStart(ModelView):
"Succeed Payment"
__name__ = 'account.payment.succeed.start'
date = fields.Date("Date", required=True)
-1
View File
@@ -19,7 +19,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationSepaMandateSequence(ModelSQL, CompanyValueMixin):
"Account Configuration SEPA Mandate Sequence"
__name__ = 'account.configuration.sepa_mandate_sequence'
sepa_mandate_sequence = fields.Many2One(
'ir.sequence', "SEPA Mandate Sequence",
-2
View File
@@ -473,7 +473,6 @@ class Payment(metaclass=PoolMeta):
class Mandate(Workflow, ModelSQL, ModelView):
'SEPA Mandate'
__name__ = 'account.payment.sepa.mandate'
party = fields.Many2One(
'party.party', "Party", required=True,
@@ -801,7 +800,6 @@ class MandateReport(CompanyReport):
class Message(Workflow, ModelSQL, ModelView):
'SEPA Message'
__name__ = 'account.payment.sepa.message'
_states = {
'readonly': Eval('state') != 'draft',
@@ -704,7 +704,6 @@ class Payment(StripeCustomerMethodMixin, CheckoutMixin, metaclass=PoolMeta):
class Refund(Workflow, ModelSQL, ModelView):
"Stripe Payment Refund"
__name__ = 'account.payment.stripe.refund'
payment = fields.Many2One(
@@ -963,7 +962,6 @@ class Refund(Workflow, ModelSQL, ModelView):
class Account(ModelSQL, ModelView):
"Stripe Account"
__name__ = 'account.payment.stripe.account'
name = fields.Char("Name", required=True)
@@ -1411,7 +1409,6 @@ class Account(ModelSQL, ModelView):
class Customer(CheckoutMixin, DeactivableMixin, ModelSQL, ModelView):
"Stripe Customer"
__name__ = 'account.payment.stripe.customer'
_history = True
_rec_name = 'stripe_customer_id'
@@ -1879,7 +1876,6 @@ class Customer(CheckoutMixin, DeactivableMixin, ModelSQL, ModelView):
class CustomerFingerprint(ModelSQL):
"Stripe Customer Fingerprint"
__name__ = 'account.payment.stripe.customer.fingerprint'
customer = fields.Many2One(
'account.payment.stripe.customer', "Customer",
@@ -1898,7 +1894,6 @@ class CustomerFingerprint(ModelSQL):
class CustomerIdentical(ModelSQL):
"Stripe Customer Identical"
__name__ = 'account.payment.stripe.customer.identical'
source = fields.Many2One('account.payment.stripe.customer', "Source")
target = fields.Many2One('account.payment.stripe.customer', "Target")
@@ -1924,7 +1919,6 @@ class CustomerIdentical(ModelSQL):
class Checkout(Wizard):
"Stripe Checkout"
__name__ = 'account.payment.stripe.checkout'
start_state = 'checkout'
checkout = StateAction('account_payment_stripe.url_checkout')
@@ -1935,12 +1929,10 @@ class Checkout(Wizard):
class CheckoutPage(Report):
"Stripe Checkout"
__name__ = 'account.payment.stripe.checkout'
class CustomerSourceDetach(Wizard):
"Detach Customer Source"
__name__ = 'account.payment.stripe.customer.source.detach'
start_state = 'ask'
ask = StateView(
@@ -1963,7 +1955,6 @@ class CustomerSourceDetach(Wizard):
class CustomerSourceDetachAsk(ModelView):
"Detach Customer Source"
__name__ = 'account.payment.stripe.customer.source.detach.ask'
customer = fields.Many2One(
-4
View File
@@ -255,7 +255,6 @@ class Category(CompanyMultiValueMixin, metaclass=PoolMeta):
class CategoryAccount(ModelSQL, CompanyValueMixin):
"Category Account"
__name__ = 'product.category.account'
category = fields.Many2One(
'product.category', "Category", ondelete='CASCADE',
@@ -278,7 +277,6 @@ class CategoryAccount(ModelSQL, CompanyValueMixin):
class CategoryCustomerTax(ModelSQL):
'Category - Customer Tax'
__name__ = 'product.category-customer-account.tax'
category = fields.Many2One(
'product.category', "Category", ondelete='CASCADE', required=True)
@@ -299,7 +297,6 @@ class CategoryCustomerTax(ModelSQL):
class CategorySupplierTax(ModelSQL):
'Category - Supplier Tax'
__name__ = 'product.category-supplier-account.tax'
category = fields.Many2One(
'product.category', "Category", ondelete='CASCADE', required=True)
@@ -412,7 +409,6 @@ class Product(metaclass=PoolMeta):
class TemplateAccountCategory(ModelSQL):
"Template - Account Category"
__name__ = 'product.template-product.category.account'
template = fields.Many2One('product.template', 'Template')
category = fields.Many2One('product.category', 'Category')
@@ -360,7 +360,6 @@ class AccountRuleAccountAbstract(sequence_ordered(), ModelSQL, ModelView):
class AccountReceivableRule(AccountRuleAbstract):
"Account Receivable Rule"
__name__ = 'account.account.receivable.rule'
accounts = fields.One2Many(
@@ -387,7 +386,6 @@ class AccountReceivableRule(AccountRuleAbstract):
class AccountReceivableRuleAccount(AccountRuleAccountAbstract):
"Account Receivable Rule Account"
__name__ = 'account.account.receivable.rule.account'
rule = fields.Many2One(
-1
View File
@@ -33,7 +33,6 @@ class Configuration(metaclass=PoolMeta):
class AccountRule(sequence_ordered(), MatchMixin, ModelSQL, ModelView):
"Account Rule"
__name__ = 'account.account.rule'
company = fields.Many2One('company.company', "Company", required=True)
-1
View File
@@ -8,7 +8,6 @@ from trytond.transaction import Transaction
class Journal(DeactivableMixin, ModelSQL, ModelView):
'Statement Journal'
__name__ = 'account.statement.journal'
name = fields.Char('Name', required=True)
journal = fields.Many2One(
-8
View File
@@ -50,7 +50,6 @@ class Unequal(object):
class Statement(Workflow, ModelSQL, ModelView):
'Account Statement'
__name__ = 'account.statement'
_states = {'readonly': Eval('state') != 'draft'}
@@ -740,7 +739,6 @@ _states = {
class Line(origin_mixin(_states), sequence_ordered(), ModelSQL, ModelView):
'Account Statement Line'
__name__ = 'account.statement.line'
move = fields.Many2One('account.move', 'Account Move', readonly=True,
@@ -1090,7 +1088,6 @@ del _states
class LineGroup(ModelSQL, ModelView):
'Account Statement Line Group'
__name__ = 'account.statement.line.group'
_rec_name = 'number'
statement = fields.Many2One('account.statement', 'Statement')
@@ -1175,7 +1172,6 @@ _states = {
class Origin(origin_mixin(_states), ModelSQL, ModelView):
"Account Statement Origin"
__name__ = 'account.statement.origin'
_rec_name = 'number'
@@ -1258,12 +1254,10 @@ del _states
class OriginInformation(DictSchemaMixin, ModelSQL, ModelView):
"Statement Origin Information"
__name__ = 'account.statement.origin.information'
class ImportStatementStart(ModelView):
"Statement Import Start"
__name__ = 'account.statement.import.start'
company = fields.Many2One('company.company', "Company", required=True)
file_ = fields.Binary("File", required=True)
@@ -1280,7 +1274,6 @@ class ImportStatementStart(ModelView):
class ImportStatement(Wizard):
"Statement Import"
__name__ = 'account.statement.import'
start = StateView('account.statement.import.start',
'account_statement.statement_import_start_view_form', [
@@ -1305,7 +1298,6 @@ class ImportStatement(Wizard):
class ReconcileStatement(Wizard):
"Statement Reconcile"
__name__ = 'account.statement.reconcile'
start = StateAction('account.act_reconcile')
@@ -62,7 +62,6 @@ class StatementOrigin(metaclass=PoolMeta):
class StatementRule(sequence_ordered(), ModelSQL, ModelView):
"Account Statement Rule"
__name__ = 'account.statement.rule'
name = fields.Char("Name")
@@ -147,7 +146,6 @@ class StatementRule(sequence_ordered(), ModelSQL, ModelView):
class StatementRuleInformation(sequence_ordered(), ModelSQL, ModelView):
"Account Statement Rule Information"
__name__ = 'account.statement.rule.information'
rule = fields.Many2One(
@@ -275,7 +273,6 @@ _add_range(StatementRuleInformation, 'number', fields.Numeric, "Numeric")
class StatementRuleLine(sequence_ordered(), ModelSQL, ModelView):
"Account Statement Rule Line"
__name__ = 'account.statement.rule.line'
rule = fields.Many2One(
@@ -17,7 +17,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationStockJournal(ModelSQL, ValueMixin):
"Account Configuration Stock Journal"
__name__ = 'account.configuration.stock_journal'
stock_journal = stock_journal
@@ -23,7 +23,6 @@ from trytond.wizard import Button, StateTransition, StateView, Wizard
class IntrastatTransaction(DeactivableMixin, ModelSQL, ModelView):
"Intrastat Transaction"
__name__ = 'account.stock.eu.intrastat.transaction'
_rec_name = 'code'
@@ -78,7 +77,6 @@ class IntrastatTransaction(DeactivableMixin, ModelSQL, ModelView):
class IntrastatTransport(DeactivableMixin, ModelSQL, ModelView):
"Intrastat Transport"
__name__ = 'account.stock.eu.intrastat.transport'
name = fields.Char("Name", translate=True, required=True)
@@ -86,7 +84,6 @@ class IntrastatTransport(DeactivableMixin, ModelSQL, ModelView):
class IntrastatDeclaration(Workflow, ModelSQL, ModelView):
"Intrastat Declaration"
__name__ = 'account.stock.eu.intrastat.declaration'
_states = {
@@ -232,7 +229,6 @@ class IntrastatDeclaration(Workflow, ModelSQL, ModelView):
class IntrastatDeclarationContext(ModelView):
"Intrastat Declaration Context"
__name__ = 'account.stock.eu.intrastat.declaration.context'
company = fields.Many2One('company.company', "Company", required=True)
@@ -266,7 +262,6 @@ class IntrastatDeclarationContext(ModelView):
class IntrastatDeclarationLine(ModelSQL, ModelView):
"Intrastat Declaration Line"
__name__ = 'account.stock.eu.intrastat.declaration.line'
type = fields.Selection([
@@ -397,7 +392,6 @@ class IntrastatDeclarationLine_Incoterm(metaclass=PoolMeta):
class IntrastatDeclarationExport(Wizard):
"Intrastat Declaration Export"
__name__ = 'account.stock.eu.intrastat.declaration.export'
start_state = 'generate'
@@ -473,7 +467,6 @@ class IntrastatDeclarationExport_Incoterm(metaclass=PoolMeta):
class IntrastatDeclarationExportResult(ModelView):
"Intrastat Declaration Export"
__name__ = 'account.stock.eu.intrastat.declaration.export.result'
file = fields.Binary("File", readonly=True, filename='filename')
@@ -45,7 +45,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationLandedCostSequence(ModelSQL, CompanyValueMixin):
"Account Configuration Landed Cost Sequence"
__name__ = 'account.configuration.landed_cost_sequence'
landed_cost_sequence = fields.Many2One(
'ir.sequence', "Landed Cost Sequence", required=True,
@@ -67,7 +66,6 @@ class ConfigurationLandedCostSequence(ModelSQL, CompanyValueMixin):
class LandedCost(Workflow, ModelSQL, ModelView, MatchMixin):
'Landed Cost'
__name__ = 'account.landed_cost'
_rec_name = 'number'
number = fields.Char("Number", readonly=True)
@@ -445,7 +443,6 @@ class LandedCost(Workflow, ModelSQL, ModelView, MatchMixin):
class LandedCost_Shipment(ModelSQL):
'Landed Cost - Shipment'
__name__ = 'account.landed_cost-stock.shipment.in'
landed_cost = fields.Many2One(
'account.landed_cost', 'Landed Cost',
@@ -455,7 +452,6 @@ class LandedCost_Shipment(ModelSQL):
class LandedCost_ProductCategory(ModelSQL):
"Landed Cost - Product Category"
__name__ = 'account.landed_cost-product.category'
landed_cost = fields.Many2One(
'account.landed_cost', 'Landed Cost',
@@ -465,7 +461,6 @@ class LandedCost_ProductCategory(ModelSQL):
class LandedCost_Product(ModelSQL):
"Landed Cost - Product"
__name__ = 'account.landed_cost-product.product'
landed_cost = fields.Many2One(
'account.landed_cost', "Landed Cost",
@@ -501,7 +496,6 @@ class ShowLandedCostMixin(Wizard):
class PostLandedCost(ShowLandedCostMixin):
"Post Landed Cost"
__name__ = 'account.landed_cost.post'
post = StateTransition()
@@ -519,7 +513,6 @@ class PostLandedCost(ShowLandedCostMixin):
class ShowLandedCost(ShowLandedCostMixin):
"Show Landed Cost"
__name__ = 'account.landed_cost.show'
@classmethod
@@ -535,7 +528,6 @@ class ShowLandedCost(ShowLandedCostMixin):
class LandedCostShow(ModelView):
"Landed Cost Show"
__name__ = 'account.landed_cost.show'
cost = fields.Numeric("Cost", digits=price_digits, readonly=True)
@@ -544,7 +536,6 @@ class LandedCostShow(ModelView):
class LandedCostShowMove(ModelView):
"Landed Cost Show"
__name__ = 'account.landed_cost.show.move'
move = fields.Many2One('stock.move', "Move", readonly=True)
@@ -36,7 +36,6 @@ class Configuration(metaclass=PoolMeta):
class ConfigurationShipmentCostSequence(ModelSQL, CompanyValueMixin):
"Account Configuration Shipment Cost Sequence"
__name__ = 'account.configuration.shipment_cost_sequence'
shipment_cost_sequence = fields.Many2One(
'ir.sequence', "Shipment Cost Sequence", required=True,
@@ -59,7 +58,6 @@ class ConfigurationShipmentCostSequence(ModelSQL, CompanyValueMixin):
class ShipmentCost(Workflow, ModelSQL, ModelView):
"Shipment Cost"
__name__ = 'account.shipment_cost'
_rec_name = 'number'
@@ -338,7 +336,6 @@ class ShipmentCost(Workflow, ModelSQL, ModelView):
class ShipmentCost_Shipment(ModelSQL):
"Shipment Cost - Shipment"
__name__ = 'account.shipment_cost-stock.shipment.out'
shipment_cost = fields.Many2One(
'account.shipment_cost', "Shipment Cost",
@@ -348,7 +345,6 @@ class ShipmentCost_Shipment(ModelSQL):
class ShipmentCost_ShipmentReturn(ModelSQL):
"Shipment Cost - Shipment Return"
__name__ = 'account.shipment_cost-stock.shipment.out.return'
shipment_cost = fields.Many2One(
'account.shipment_cost', "Shipment Cost",
@@ -384,7 +380,6 @@ class ShowShipmentCostMixin(Wizard):
class PostShipmentCost(ShowShipmentCostMixin):
"Post Shipment Cost"
__name__ = 'account.shipment_cost.post'
post = StateTransition()
@@ -402,7 +397,6 @@ class PostShipmentCost(ShowShipmentCostMixin):
class ShowShipmentCost(ShowShipmentCostMixin):
"Show Shipment Cost"
__name__ = 'account.shipment_cost.show'
@classmethod
@@ -418,7 +412,6 @@ class ShowShipmentCost(ShowShipmentCostMixin):
class ShipmentCostShow(ModelView):
"Shipment Cost Show"
__name__ = 'account.shipment_cost.show'
cost = fields.Numeric("Cost", digits=price_digits, readonly=True)
@@ -428,7 +421,6 @@ class ShipmentCostShow(ModelView):
class ShipmentCostShowShipment(ModelView):
"Post Shipment Cost"
__name__ = 'account.shipment_cost.show.shipment'
shipment = fields.Reference("Shipments", [
-2
View File
@@ -82,7 +82,6 @@ class Period(metaclass=PoolMeta):
class TaxGroupCash(ModelSQL):
"Tax Group On Cash Basis"
__name__ = 'account.tax.group.cash'
fiscalyear = fields.Many2One(
@@ -356,7 +355,6 @@ class InvoiceTax(metaclass=PoolMeta):
class InvoiceTaxGroupCash(ModelSQL):
"Tax Group on Cash Basis per Invoice"
__name__ = 'account.invoice.tax.group.cash'
invoice = fields.Many2One(
-4
View File
@@ -26,7 +26,6 @@ from .exceptions import AccountValidationError
class Account(
DeactivableMixin, tree('distribution_parents'), tree(),
ModelSQL, ModelView):
'Analytic Account'
__name__ = 'analytic_account.account'
name = fields.Char("Name", required=True, translate=True)
code = fields.Char("Code")
@@ -336,14 +335,12 @@ class Account(
class AccountContext(ModelView):
'Open Chart of Accounts'
__name__ = 'analytic_account.account.context'
start_date = fields.Date('Start Date')
end_date = fields.Date('End Date')
class AccountDistribution(ModelView, ModelSQL):
"Analytic Account Distribution"
__name__ = 'analytic_account.account.distribution'
parent = fields.Many2One(
'analytic_account.account', "Parent", required=True)
@@ -372,7 +369,6 @@ class AccountDistribution(ModelView, ModelSQL):
class AnalyticAccountEntry(ModelView, ModelSQL):
'Analytic Account Entry'
__name__ = 'analytic.account.entry'
origin = fields.Reference('Origin', selection='get_origin')
root = fields.Many2One(
-2
View File
@@ -15,7 +15,6 @@ from trytond.wizard import StateAction, Wizard
class Line(ModelSQL, ModelView):
'Analytic Line'
__name__ = 'analytic_account.line'
debit = Monetary(
"Debit", currency='currency', digits='currency', required=True)
@@ -280,7 +279,6 @@ class MoveLine(metaclass=PoolMeta):
class OpenAccount(Wizard):
'Open Account'
__name__ = 'analytic_account.line.open_account'
start_state = 'open_'
open_ = StateAction('analytic_account.act_line_form')
-1
View File
@@ -9,7 +9,6 @@ from .account import AnalyticMixin
class Rule(sequence_ordered(), MatchMixin, AnalyticMixin, ModelSQL, ModelView):
"Analytic Rule"
__name__ = 'analytic_account.rule'
company = fields.Many2One(
@@ -14,7 +14,6 @@ from trytond.wizard import Button, StateAction, StateView, Wizard
class BudgetContext(ModelView):
"Analytic Budget Context"
__name__ = 'analytic_account.budget.context'
budget = fields.Many2One(
@@ -39,7 +38,6 @@ class BudgetContext(ModelView):
class Budget(BudgetMixin, ModelSQL, ModelView):
"Analytic Budget"
__name__ = 'analytic_account.budget'
start_date = fields.Date(
@@ -135,7 +133,6 @@ class Budget(BudgetMixin, ModelSQL, ModelView):
class BudgetLine(BudgetLineMixin, ModelSQL, ModelView):
"Analytic Budget"
__name__ = 'analytic_account.budget.line'
budget = fields.Many2One(
@@ -200,7 +197,6 @@ class BudgetLine(BudgetLineMixin, ModelSQL, ModelView):
class CopyBudget(CopyBudgetMixin, Wizard):
"Copy Analytic Budget"
__name__ = 'analytic_account.budget.copy'
start = StateView('analytic_account.budget.copy.start',
@@ -224,7 +220,6 @@ class CopyBudget(CopyBudgetMixin, Wizard):
class CopyBudgetStart(CopyBudgetStartMixin, ModelView):
"Copy Analytic Budget"
__name__ = 'analytic_account.budget.copy.start'
start_date = fields.Date(
-4
View File
@@ -28,7 +28,6 @@ class SQLiteStrftime(Function):
class Line(ModelSQL, ModelView):
"Attendance Line"
__name__ = 'attendance.line'
company = fields.Many2One('company.company', "Company", required=True,
@@ -157,7 +156,6 @@ class Line(ModelSQL, ModelView):
class Period(Workflow, ModelSQL, ModelView):
"Attendance Period"
__name__ = 'attendance.period'
_states = {
'readonly': Eval('state') == 'closed',
@@ -274,7 +272,6 @@ class Period(Workflow, ModelSQL, ModelView):
class SheetLine(ModelSQL, ModelView):
"Attendance SheetLine"
__name__ = 'attendance.sheet.line'
company = fields.Many2One('company.company', "Company")
@@ -368,7 +365,6 @@ class SheetLine(ModelSQL, ModelView):
class Sheet(ModelSQL, ModelView):
"Attendance Sheet"
__name__ = 'attendance.sheet'
company = fields.Many2One('company.company', "Company")
+2 -4
View File
@@ -52,10 +52,8 @@ class User(metaclass=PoolMeta):
class UserLoginSMSCode(ModelSQL):
"""SMS Code
This class is separated from the res.user one in order to prevent locking
the res.user table when in a long running process.
"""This class is separated from the res.user one in order to prevent
locking the res.user table when in a long running process.
"""
__name__ = 'res.user.login.sms_code'
-4
View File
@@ -21,7 +21,6 @@ from .exceptions import AccountValidationError, IBANValidationError, InvalidBIC
class Bank(ModelSQL, ModelView):
'Bank'
__name__ = 'bank'
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE')
@@ -88,7 +87,6 @@ class Bank(ModelSQL, ModelView):
class Account(DeactivableMixin, ModelSQL, ModelView):
'Bank Account'
__name__ = 'bank.account'
bank = fields.Many2One(
'bank', "Bank",
@@ -178,7 +176,6 @@ class Account(DeactivableMixin, ModelSQL, ModelView):
class AccountNumber(DeactivableMixin, sequence_ordered(), ModelSQL, ModelView):
'Bank Account Number'
__name__ = 'bank.account.number'
_rec_name = 'number'
account = fields.Many2One(
@@ -300,7 +297,6 @@ class AccountNumber(DeactivableMixin, sequence_ordered(), ModelSQL, ModelView):
class AccountParty(ModelSQL):
'Bank Account - Party'
__name__ = 'bank.account-party.party'
account = fields.Many2One(
'bank.account', "Account", ondelete='CASCADE', required=True)
-2
View File
@@ -9,7 +9,6 @@ from trytond.transaction import inactive_records
class Carrier(DeactivableMixin, ModelSQL, ModelView):
'Carrier'
__name__ = 'carrier'
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE', help="The party which represents the carrier.")
@@ -84,7 +83,6 @@ class Carrier(DeactivableMixin, ModelSQL, ModelView):
class Selection(
DeactivableMixin, sequence_ordered(), MatchMixin, ModelSQL, ModelView):
'Carrier Selection'
__name__ = 'carrier.selection'
_get_carriers_cache = Cache(
'carrier.selection.get_carriers', context=False)
-1
View File
@@ -132,7 +132,6 @@ class Line(metaclass=PoolMeta):
class Carriage(sequence_ordered(), ModelSQL, ModelView):
"Sale Carriage"
__name__ = 'sale.carriage'
_states = {
-1
View File
@@ -16,7 +16,6 @@ except ImportError:
class Carriage(sequence_ordered(), ShipmentCostMixin, ModelSQL, ModelView):
"Shipment Carriage"
__name__ = 'stock.shipment.carriage'
_states = {
-1
View File
@@ -77,7 +77,6 @@ class Carrier(metaclass=PoolMeta):
class WeightPriceList(ModelSQL, ModelView):
'Carrier Weight Price List'
__name__ = 'carrier.weight_price_list'
carrier = fields.Many2One(
'carrier', "Carrier", required=True,
-7
View File
@@ -30,7 +30,6 @@ from .exceptions import FormulaError
class Agent(DeactivableMixin, ModelSQL, ModelView):
'Commission Agent'
__name__ = 'commission.agent'
party = fields.Many2One('party.party', "Party", required=True,
context={
@@ -179,7 +178,6 @@ class Agent(DeactivableMixin, ModelSQL, ModelView):
class AgentSelection(sequence_ordered(), MatchMixin, ModelSQL, ModelView):
"Agent Selection"
__name__ = 'commission.agent.selection'
agent = fields.Many2One(
'commission.agent', "Agent", required=True,
@@ -248,7 +246,6 @@ class AgentSelection(sequence_ordered(), MatchMixin, ModelSQL, ModelView):
class Plan(ModelSQL, ModelView):
'Commission Plan'
__name__ = 'commission.plan'
name = fields.Char('Name', required=True, translate=True)
commission_product = fields.Many2One('product.product',
@@ -304,7 +301,6 @@ class Plan(ModelSQL, ModelView):
class PlanLines(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
'Commission Plan Line'
__name__ = 'commission.plan.line'
plan = fields.Many2One('commission.plan', 'Plan', required=True,
ondelete='CASCADE',
@@ -366,7 +362,6 @@ class PlanLines(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
class Commission(ModelSQL, ModelView):
'Commission'
__name__ = 'commission'
_readonly_states = {
'readonly': Bool(Eval('invoice_line')),
@@ -608,7 +603,6 @@ class Commission(ModelSQL, ModelView):
class CreateInvoice(Wizard):
'Create Commission Invoice'
__name__ = 'commission.create_invoice'
start_state = 'ask'
ask = StateView('commission.create_invoice.ask',
@@ -646,7 +640,6 @@ class CreateInvoice(Wizard):
class CreateInvoiceAsk(ModelView):
'Create Commission Invoice'
__name__ = 'commission.create_invoice.ask'
from_ = fields.Date('From',
domain=[
@@ -18,7 +18,6 @@ from trytond.transaction import Transaction
class Agent(ModelView, ModelSQL):
"Commission Reporting per Agent"
__name__ = 'commission.reporting.agent'
agent = fields.Many2One('commission.agent', 'Agent')
@@ -151,7 +150,6 @@ class Agent(ModelView, ModelSQL):
class AgentTimeseries(Agent):
"Commission Reporting per Agent"
__name__ = 'commission.reporting.agent.time_series'
date = fields.Date("Date")
@@ -187,7 +185,6 @@ class AgentTimeseries(Agent):
class Context(ModelView):
"Commission Reporting Context"
__name__ = 'commission.reporting.context'
type = fields.Selection([
-1
View File
@@ -26,7 +26,6 @@ class Template(metaclass=PoolMeta):
class Template_Agent(ModelSQL):
'Product Template - Commission Agent'
__name__ = 'product.template-commission.agent'
template = fields.Many2One(
'product.template', "Template", required=True)
-5
View File
@@ -42,7 +42,6 @@ _SUBSTITUTION_HELP = (
class Company(ModelSQL, ModelView):
'Company'
__name__ = 'company.company'
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE')
@@ -198,7 +197,6 @@ class Company(ModelSQL, ModelView):
class CompanyLogoCache(ModelSQL):
"Company Logo Cache"
__name__ = 'company.company.logo.cache'
company = fields.Many2One(
@@ -228,7 +226,6 @@ class CompanyLogoCache(ModelSQL):
class Employee(ModelSQL, ModelView):
'Employee'
__name__ = 'company.employee'
party = fields.Many2One('party.party', 'Party', required=True,
context={
@@ -319,12 +316,10 @@ class Employee(ModelSQL, ModelView):
class CompanyConfigStart(ModelView):
'Company Config'
__name__ = 'company.company.config.start'
class CompanyConfig(Wizard):
'Configure Company'
__name__ = 'company.company.config'
start = StateView('company.company.config.start',
'company.company_config_start_view_form', [
-1
View File
@@ -96,7 +96,6 @@ class Cron(metaclass=PoolMeta):
class CronCompany(ModelSQL):
'Cron - Company'
__name__ = 'ir.cron-company.company'
cron = fields.Many2One(
'ir.cron', "Cron", ondelete='CASCADE', required=True)
-2
View File
@@ -10,7 +10,6 @@ from trytond.transaction import Transaction
class UserCompany(ModelSQL):
"User - Company"
__name__ = 'res.user-company.company'
user = fields.Many2One(
@@ -43,7 +42,6 @@ class UserCompany(ModelSQL):
class UserEmployee(ModelSQL):
'User - Employee'
__name__ = 'res.user-company.employee'
user = fields.Many2One(
'res.user', "User", ondelete='CASCADE', required=True)
-6
View File
@@ -14,7 +14,6 @@ from trytond.transaction import Transaction
class Organization(ModelSQL, ModelView):
"Organization"
__name__ = 'country.organization'
name = fields.Char("Name", required=True, translate=True)
@@ -30,7 +29,6 @@ class Organization(ModelSQL, ModelView):
class OrganizationMember(ModelSQL, ModelView):
"Organization Member"
__name__ = 'country.organization.member'
organization = fields.Many2One(
@@ -105,7 +103,6 @@ class OrganizationMember(ModelSQL, ModelView):
class Region(tree(), ModelSQL, ModelView):
"Region"
__name__ = 'country.region'
name = fields.Char("Name", required=True, translate=True)
@@ -141,7 +138,6 @@ class Region(tree(), ModelSQL, ModelView):
class Country(DeactivableMixin, ModelSQL, ModelView):
'Country'
__name__ = 'country.country'
name = fields.Char(
"Name", required=True, translate=True,
@@ -253,7 +249,6 @@ class Country(DeactivableMixin, ModelSQL, ModelView):
class Subdivision(DeactivableMixin, ModelSQL, ModelView):
"Subdivision"
__name__ = 'country.subdivision'
country = fields.Many2One(
'country.country', "Country", required=True,
@@ -484,7 +479,6 @@ class Subdivision(DeactivableMixin, ModelSQL, ModelView):
class PostalCode(ModelSQL, ModelView):
"Postal Code"
__name__ = 'country.postal_code'
country = fields.Many2One(
'country.country', "Country", required=True, ondelete='CASCADE',
-4
View File
@@ -38,7 +38,6 @@ ROUNDING_OPPOSITES = {
class Currency(
SymbolMixin, DigitsMixin, DeactivableMixin, ModelSQL, ModelView):
'Currency'
__name__ = 'currency.currency'
name = fields.Char('Name', required=True, translate=True,
help="The main identifier of the currency.")
@@ -268,7 +267,6 @@ class Currency(
class CurrencyRate(ModelSQL, ModelView):
"Currency Rate"
__name__ = 'currency.currency.rate'
date = fields.Date(
"Date", required=True,
@@ -326,7 +324,6 @@ class CronFetchError(Exception):
class Cron(ModelSQL, ModelView):
"Currency Cron"
__name__ = 'currency.cron'
source = fields.Selection(
@@ -476,7 +473,6 @@ class Cron(ModelSQL, ModelView):
class Cron_Currency(ModelSQL):
"Currency Cron - Currency"
__name__ = 'currency.cron-currency.currency'
cron = fields.Many2One(
-2
View File
@@ -41,7 +41,6 @@ class CountryMatchMixin(MatchMixin):
class TariffCode(DeactivableMixin, CountryMatchMixin, ModelSQL, ModelView):
'Tariff Code'
__name__ = 'customs.tariff.code'
_rec_name = 'code'
code = fields.Char('Code', required=True,
@@ -143,7 +142,6 @@ class TariffCode(DeactivableMixin, CountryMatchMixin, ModelSQL, ModelView):
class DutyRate(CountryMatchMixin, ModelSQL, ModelView):
'Duty Rate'
__name__ = 'customs.duty.rate'
tariff_code = fields.Many2One(
'customs.tariff.code', "Tariff Code", required=True)
-1
View File
@@ -152,7 +152,6 @@ class Template(metaclass=PoolMeta):
class Product_TariffCode(sequence_ordered(), ModelSQL, ModelView):
'Product - Tariff Code'
__name__ = 'product-customs.tariff.code'
product = fields.Reference('Product', selection=[
('product.template', 'Template'),
-1
View File
@@ -5,7 +5,6 @@ from trytond.pyson import Eval
class Action(sequence_ordered(), ModelSQL, ModelView):
"Dashboard Action"
__name__ = "dashboard.action"
user = fields.Many2One('res.user', "User", required=True)
act_window = fields.Many2One('ir.action.act_window', 'Action',
-4
View File
@@ -27,12 +27,10 @@ else:
class IncomingConfiguration(ModelSingleton, ModelSQL, ModelView):
"Incoming Document Configuration"
__name__ = 'document.incoming.configuration'
class Incoming(DeactivableMixin, Workflow, ModelSQL, ModelView):
"Incoming Document"
__name__ = 'document.incoming'
_states = {
@@ -298,7 +296,6 @@ def iter_pages(expression, size):
class IncomingSplit(Wizard):
"Split Incoming Document"
__name__ = 'document.incoming.split'
start = StateView(
@@ -356,7 +353,6 @@ class IncomingSplit(Wizard):
class IncomingSplitStart(ModelView):
"Split Incoming Document"
__name__ = 'document.incoming.split.start'
data = fields.Binary("Data", readonly=True)
@@ -389,7 +389,6 @@ class IncomingSupplierInvoicePurchase(metaclass=PoolMeta):
class IncomingOCRService(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
"Incoming Document OCR Service"
__name__ = 'document.incoming.ocr.service'
type = fields.Selection([
-1
View File
@@ -51,7 +51,6 @@ def remove_comment(stream):
class Invoice(Model):
"EDocument UN/CEFACT Invoice"
__name__ = 'edocument.uncefact.invoice'
__slots__ = ('invoice',)
-4
View File
@@ -26,7 +26,6 @@ else:
class Inbox(ModelSQL, ModelView):
"Inbound Email Inbox"
__name__ = 'inbound.email.inbox'
name = fields.Char("Name", required=True)
@@ -105,7 +104,6 @@ def _email_attachments(message):
class Email(ModelSQL, ModelView):
"Inbound Email"
__name__ = 'inbound.email'
inbox = fields.Many2One(
@@ -234,7 +232,6 @@ class Email(ModelSQL, ModelView):
class Rule(sequence_ordered(), ModelSQL, ModelView):
"Inbound Email Rule"
__name__ = 'inbound.email.rule'
inbox = fields.Many2One(
@@ -305,7 +302,6 @@ class Rule(sequence_ordered(), ModelSQL, ModelView):
class RuleHeader(ModelSQL, ModelView):
"Inbound Email Rule Header"
__name__ = 'inbound.email.rule.header'
rule = fields.Many2One(
-2
View File
@@ -7,7 +7,6 @@ from trytond.pool import Pool
class Incoterm(MatchMixin, ModelSQL, ModelView):
"Incoterm"
__name__ = 'incoterm.incoterm'
_rec_name = 'code'
@@ -65,7 +64,6 @@ class Incoterm(MatchMixin, ModelSQL, ModelView):
class Incoterm_Company(ModelSQL):
"Incoterm - Company"
__name__ = 'incoterm.incoterm-company.company'
incoterm = fields.Many2One('incoterm.incoterm', "Incoterm", required=True)
-1
View File
@@ -86,7 +86,6 @@ class Address(metaclass=PoolMeta):
class Incoterm(sequence_ordered(), ModelView, ModelSQL):
"Party Incoterm"
__name__ = 'party.incoterm'
party = fields.Many2One(
@@ -95,7 +95,6 @@ def trend_mixin(model_name, field_name):
class Scenario(
trend_mixin('marketing.automation.reporting.scenario', 'scenario'),
Workflow, ModelSQL, ModelView):
"Marketing Scenario"
__name__ = 'marketing.automation.scenario'
name = fields.Char("Name", translate=True)
@@ -315,7 +314,6 @@ class Scenario(
class Activity(
trend_mixin('marketing.automation.reporting.activity', 'activity'),
ModelSQL, ModelView):
"Marketing Activity"
__name__ = 'marketing.automation.activity'
name = fields.Char("Name", translate=True, required=True)
@@ -764,7 +762,6 @@ class Activity(
class Record(ModelSQL, ModelView):
"Marketing Record"
__name__ = 'marketing.automation.record'
scenario = fields.Many2One(
@@ -865,7 +862,6 @@ class Record(ModelSQL, ModelView):
class RecordActivity(Workflow, ModelSQL, ModelView):
"Marketing Record Activity"
__name__ = 'marketing.automation.record.activity'
record = fields.Many2One(
@@ -1051,5 +1047,4 @@ class RecordActivity(Workflow, ModelSQL, ModelView):
class Unsubscribe(Report):
"Marketing Automation Unsubscribe"
__name__ = 'marketing.automation.unsubscribe'
@@ -14,7 +14,6 @@ from trytond.transaction import Transaction
class Context(ModelView):
"Marketing Automation Reporting Context"
__name__ = 'marketing.automation.reporting.context'
from_date = fields.Date("From Date",
@@ -83,7 +82,6 @@ class Abstract(ModelSQL, ModelView):
class Scenario(Abstract):
"Marketing Automation Reporting Scenario"
__name__ = 'marketing.automation.reporting.scenario'
scenario = fields.Many2One(
@@ -151,7 +149,6 @@ class Scenario(Abstract):
class Activity(Abstract):
"Marketing Automation Reporting Activity"
__name__ = 'marketing.automation.reporting.activity'
activity = fields.Many2One(
-1
View File
@@ -38,7 +38,6 @@ class Party(MarketingAutomationMixin, metaclass=PoolMeta):
class PartyUnsubscribedScenario(ModelSQL):
"Party Unsubscribed Scenario"
__name__ = 'party.party-unsubscribed-marketing.automation.scenario'
party = fields.Many2One(
-3
View File
@@ -67,17 +67,14 @@ class Parameter(DeactivableMixin, ModelSQL, ModelView):
class Campaign(Parameter):
"Marketing Campaign"
__name__ = 'marketing.campaign'
class Medium(Parameter):
"Marketing Medium"
__name__ = 'marketing.medium'
class Source(Parameter):
"Marketing Source"
__name__ = 'marketing.source'
@@ -67,7 +67,6 @@ class Context(MarketingCampaignMixin, metaclass=PoolMeta):
class MarketingContext(BaseContext, metaclass=PoolMeta):
"Sale Opportunity Reporting Context"
__name__ = 'sale.opportunity.reporting.marketing.context'
group_by_marketing_campaign = fields.Boolean(
@@ -79,7 +78,6 @@ class MarketingContext(BaseContext, metaclass=PoolMeta):
class Marketing(MarketingCampaignMixin, ModelView, Abstract):
"Sale Opportunity Reporting per Marketing"
__name__ = 'sale.opportunity.reporting.marketing'
@classmethod
@@ -68,7 +68,6 @@ class Context(MarketingCampaignMixin, metaclass=PoolMeta):
class MarketingContext(BaseContext):
"Sale Reporting Context"
__name__ = 'sale.reporting.marketing.context'
group_by_marketing_campaign = fields.Boolean(
@@ -80,7 +79,6 @@ class MarketingContext(BaseContext):
class Marketing(MarketingCampaignMixin, Abstract, ModelView):
"Sale Reporting per Marketing"
__name__ = 'sale.reporting.marketing'
@classmethod
-5
View File
@@ -57,7 +57,6 @@ def _extract_params(url):
class Email(DeactivableMixin, ModelSQL, ModelView):
"Marketing Email"
__name__ = 'marketing.email'
_rec_name = 'email'
@@ -243,7 +242,6 @@ class EmailUnsubscribe(Report):
class EmailList(DeactivableMixin, ModelSQL, ModelView):
"Marketing Mailing List"
__name__ = 'marketing.email.list'
name = fields.Char("Name", required=True)
@@ -339,7 +337,6 @@ class EmailList(DeactivableMixin, ModelSQL, ModelView):
class Message(Workflow, ModelSQL, ModelView):
"Marketing Email Message"
__name__ = 'marketing.email.message'
_rec_name = 'title'
@@ -529,7 +526,6 @@ class Message(Workflow, ModelSQL, ModelView):
class SendTest(Wizard):
"Send Test Email"
__name__ = 'marketing.email.send_test'
start = StateView(
'marketing.email.send_test',
@@ -557,7 +553,6 @@ class SendTest(Wizard):
class SendTestView(ModelView):
"Send Test Email"
__name__ = 'marketing.email.send_test'
list_ = fields.Many2One(
@@ -19,7 +19,6 @@ from .exceptions import TemplateError
class Email(ModelSQL, ModelView):
"Email Notification"
__name__ = 'notification.email'
from_ = fields.Char(
@@ -328,7 +327,6 @@ class Email(ModelSQL, ModelView):
class EmailAttachment(ModelSQL):
"Email Notification Attachment"
__name__ = 'notification.email.attachment'
notification = fields.Many2One(
-3
View File
@@ -25,7 +25,6 @@ from .exceptions import InvalidFormat
class Address(
DeactivableMixin, sequence_ordered(), _ContactMechanismMixin,
ModelSQL, ModelView):
"Address"
__name__ = 'party.address'
party = fields.Many2One(
'party.party', "Party", required=True, ondelete='CASCADE',
@@ -274,7 +273,6 @@ class Address(
class AddressFormat(DeactivableMixin, MatchMixin, ModelSQL, ModelView):
"Address Format"
__name__ = 'party.address.format'
country_code = fields.Char("Country Code", size=2)
language_code = fields.Char("Language Code", size=2)
@@ -407,7 +405,6 @@ ${COUNTRY}"""
class SubdivisionType(DeactivableMixin, ModelSQL, ModelView):
"Address Subdivision Type"
__name__ = 'party.address.subdivision_type'
country_code = fields.Char("Country Code", size=2, required=True)
types = fields.MultiSelection('get_subdivision_types', "Subdivision Types")
-1
View File
@@ -8,7 +8,6 @@ from trytond.model import (
class Category(DeactivableMixin, tree(separator=' / '), ModelSQL, ModelView):
"Category"
__name__ = 'party.category'
name = fields.Char(
"Name", required=True, translate=True,
-3
View File
@@ -20,7 +20,6 @@ party_lang = fields.Many2One("ir.lang", 'Party Language',
class Configuration(ModelSingleton, ModelSQL, ModelView, MultiValueMixin):
'Party Configuration'
__name__ = 'party.configuration'
party_sequence = fields.MultiValue(party_sequence)
@@ -108,7 +107,6 @@ class Configuration(ModelSingleton, ModelSQL, ModelView, MultiValueMixin):
class ConfigurationSequence(ModelSQL, ValueMixin):
'Party Configuration Sequence'
__name__ = 'party.configuration.party_sequence'
party_sequence = party_sequence
@@ -118,6 +116,5 @@ class ConfigurationSequence(ModelSQL, ValueMixin):
class ConfigurationLang(ModelSQL, ValueMixin):
'Party Configuration Lang'
__name__ = 'party.configuration.party_lang'
party_lang = party_lang
-2
View File
@@ -68,7 +68,6 @@ class _ContactMechanismMixin:
class ContactMechanism(
DeactivableMixin, sequence_ordered(), ModelSQL, ModelView,
MultiValueMixin):
"Contact Mechanism"
__name__ = 'party.contact_mechanism'
_rec_name = 'value'
@@ -352,7 +351,6 @@ class ContactMechanism(
class ContactMechanismLanguage(ModelSQL, ValueMixin):
"Contact Mechanism Language"
__name__ = 'party.contact_mechanism.language'
contact_mechanism = fields.Many2One(
'party.contact_mechanism', "Contact Mechanism",
-10
View File
@@ -32,7 +32,6 @@ logger = logging.getLogger(__name__)
class Party(
DeactivableMixin, _ContactMechanismMixin, ModelSQL, ModelView,
MultiValueMixin):
"Party"
__name__ = 'party.party'
_contact_mechanism_states = {
@@ -433,7 +432,6 @@ class Party(
class PartyLang(ModelSQL, ValueMixin):
"Party Lang"
__name__ = 'party.party.lang'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE')
@@ -441,7 +439,6 @@ class PartyLang(ModelSQL, ValueMixin):
class PartyCategory(ModelSQL):
'Party - Category'
__name__ = 'party.party-party.category'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE', required=True)
@@ -797,7 +794,6 @@ TAX_IDENTIFIER_TYPES = list(map(replace_vat, TAX_IDENTIFIER_TYPES))
class Identifier(sequence_ordered(), DeactivableMixin, ModelSQL, ModelView):
'Party Identifier'
__name__ = 'party.identifier'
_rec_name = 'code'
party = fields.Many2One(
@@ -918,7 +914,6 @@ class Identifier(sequence_ordered(), DeactivableMixin, ModelSQL, ModelView):
class CheckVIESResult(ModelView):
'Check VIES'
__name__ = 'party.check_vies.result'
parties_succeed = fields.Many2Many('party.party', None, None,
'Parties Succeed', readonly=True, states={
@@ -931,7 +926,6 @@ class CheckVIESResult(ModelView):
class CheckVIES(Wizard):
'Check VIES'
__name__ = 'party.check_vies'
start_state = 'check'
@@ -983,7 +977,6 @@ class CheckVIES(Wizard):
class Replace(Wizard):
"Replace Party"
__name__ = 'party.replace'
start_state = 'ask'
ask = StateView('party.replace.ask', 'party.replace_ask_view_form', [
@@ -1086,7 +1079,6 @@ class Replace(Wizard):
class ReplaceAsk(ModelView):
"Replace Party"
__name__ = 'party.replace.ask'
source = fields.Many2One('party.party', "Source", required=True,
help="The party to be replaced.")
@@ -1109,7 +1101,6 @@ class ReplaceAsk(ModelView):
class Erase(Wizard):
"Erase Party"
__name__ = 'party.erase'
start_state = 'ask'
ask = StateView('party.erase.ask', 'party.erase_ask_view_form', [
@@ -1215,7 +1206,6 @@ class Erase(Wizard):
class EraseAsk(ModelView):
"Erase Party"
__name__ = 'party.erase.ask'
party = fields.Many2One('party.party', "Party", required=True,
help="The party to be erased.")
-3
View File
@@ -19,7 +19,6 @@ default_depth = config.getint('party_relationship', 'depth', default=7)
class RelationType(ModelSQL, ModelView):
'Relation Type'
__name__ = 'party.relation.type'
name = fields.Char('Name', required=True, translate=True,
@@ -41,7 +40,6 @@ class RelationType(ModelSQL, ModelView):
class Relation(ModelSQL):
'Party Relation'
__name__ = 'party.relation'
from_ = fields.Many2One(
@@ -126,7 +124,6 @@ class Relation(ModelSQL):
class RelationAll(Relation, ModelView):
'Party Relation'
__name__ = 'party.relation.all'
@classmethod
-1
View File
@@ -12,7 +12,6 @@ from trytond.tools import is_full_text, lstrip_wildcard
class Category(tree(separator=' / '), ModelSQL, ModelView):
"Product Category"
__name__ = "product.category"
name = fields.Char('Name', required=True, translate=True)
code = fields.Char(
-2
View File
@@ -20,7 +20,6 @@ def get_cost_price_methods(cls):
class Configuration(ModelSingleton, ModelSQL, ModelView, MultiValueMixin):
'Product Configuration'
__name__ = 'product.configuration'
default_cost_price_method = fields.MultiValue(default_cost_price_method)
@@ -49,7 +48,6 @@ class Configuration(ModelSingleton, ModelSQL, ModelView, MultiValueMixin):
class ConfigurationDefaultCostPriceMethod(ModelSQL, ValueMixin):
"Product Configuration Default Cost Price Method"
__name__ = 'product.configuration.default_cost_price_method'
default_cost_price_method = default_cost_price_method
get_cost_price_methods = get_cost_price_methods
-11
View File
@@ -58,9 +58,7 @@ def round_price(value, rounding=None):
class Template(
DeactivableMixin, ModelSQL, ModelView, CompanyMultiValueMixin):
"Product Template"
__name__ = "product.template"
_order_name = 'rec_name'
name = fields.Char(
"Name", size=None, required=True, translate=True)
code_readonly = fields.Function(
@@ -380,7 +378,6 @@ class ProductDeactivatableMixin(TemplateDeactivatableMixin):
class Product(
TemplateDeactivatableMixin, tree('replaced_by'), ModelSQL, ModelView,
CompanyMultiValueMixin):
"Product Variant"
__name__ = "product.product"
_order_name = 'rec_name'
template = fields.Many2One(
@@ -766,7 +763,6 @@ class Product(
class ProductListPrice(ModelSQL, CompanyValueMixin):
"Product List Price"
__name__ = 'product.list_price'
template = fields.Many2One(
'product.template', "Template", ondelete='CASCADE',
@@ -783,7 +779,6 @@ class ProductListPrice(ModelSQL, CompanyValueMixin):
class ProductCostPriceMethod(ModelSQL, CompanyValueMixin):
"Product Cost Price Method"
__name__ = 'product.cost_price_method'
template = fields.Many2One(
'product.template', "Template", ondelete='CASCADE',
@@ -805,7 +800,6 @@ class ProductCostPriceMethod(ModelSQL, CompanyValueMixin):
class ProductCostPrice(ModelSQL, CompanyValueMixin):
"Product Cost Price"
__name__ = 'product.cost_price'
product = fields.Many2One(
'product.product', "Product", ondelete='CASCADE',
@@ -823,7 +817,6 @@ class ProductCostPrice(ModelSQL, CompanyValueMixin):
class TemplateCategory(ModelSQL):
'Template - Category'
__name__ = 'product.template-product.category'
template = fields.Many2One(
'product.template', "Template", ondelete='CASCADE', required=True)
@@ -832,7 +825,6 @@ class TemplateCategory(ModelSQL):
class TemplateCategoryAll(UnionMixin, ModelSQL):
"Template - Category All"
__name__ = 'product.template-product.category.all'
template = fields.Many2One('product.template', "Template")
category = fields.Many2One('product.category', "Category")
@@ -843,7 +835,6 @@ class TemplateCategoryAll(UnionMixin, ModelSQL):
class ProductIdentifier(sequence_ordered(), ModelSQL, ModelView):
"Product Identifier"
__name__ = 'product.identifier'
_rec_name = 'code'
product = fields.Many2One(
@@ -924,7 +915,6 @@ class ProductIdentifier(sequence_ordered(), ModelSQL, ModelView):
class ProductReplace(Wizard):
"Replace Product"
__name__ = 'product.product.replace'
start_state = 'ask'
ask = StateView(
@@ -946,7 +936,6 @@ class ProductReplace(Wizard):
class ProductReplaceAsk(ModelView):
"Replace Product"
__name__ = 'product.product.replace.ask'
source = fields.Many2One(
'product.product', "Source", required=True,

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