diff options
| author | Florian Gilbert <flg@odoo.com> | 2019-10-11 14:04:44 +0000 |
|---|---|---|
| committer | Florian Gilbert <flg@odoo.com> | 2019-12-04 13:47:28 +0000 |
| commit | ed26e9eafa31dd8bcaea491b2a6dcd1728a90bd0 (patch) | |
| tree | 76e502d54192ef1c75d0704216ac844096e262e6 /addons/account/models/company.py | |
| parent | 51d020e5fa82ca4d935fe2420711b8365b5e5621 (diff) | |
[IMP] account: Various usability improvements
List of improvements:
Invoice/Bill
- Hide "untaxed amount" section when there is no tax.
- Remove tooltips for tax groups field.
- Remove invoice_partner_icon and set this icon in "Vendor" (in a list view)
Chart of Accounts
- Same views for config bar and regulare one
- By default don't show deprecated accounts and add filter to display them.
- Add some optional fields in list view (taxes, tags, ...)
Dashboard opening balance wizard
- The opening move entry date equals to the opening date - 1 day.
Bank Statements
- Set default order for the list view (by date desc and name desc)
Tax report configuration:
Add 3 new columns for the list view (country_id, code, tag_name)
Add 4 new searchs (name, tag_name, code, country_id)
Task ID: 2048225
closes odoo/odoo#38694
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/account/models/company.py')
| -rw-r--r-- | addons/account/models/company.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/addons/account/models/company.py b/addons/account/models/company.py index bfe981f362c..c7ca7fba0d1 100644 --- a/addons/account/models/company.py +++ b/addons/account/models/company.py @@ -79,7 +79,7 @@ class ResCompany(models.Model): #Fields of the setup step for opening move account_opening_move_id = fields.Many2one(string='Opening Journal Entry', comodel_name='account.move', help="The journal entry containing the initial balance of all this company's accounts.") account_opening_journal_id = fields.Many2one(string='Opening Journal', comodel_name='account.journal', related='account_opening_move_id.journal_id', help="Journal where the opening entry of this company's accounting has been posted.", readonly=False) - account_opening_date = fields.Date(string='Opening Date', related='account_opening_move_id.date', help="Date at which the opening entry of this company's accounting has been posted.", readonly=False) + account_opening_date = fields.Date(string='Opening Entry', default=lambda self: fields.Date.today().replace(month=1, day=1), required=True, help="That is the date of the opening entry.") # Fields marking the completion of a setup step # YTI FIXME : The selection should be factorize as a static list in base, like ONBOARDING_STEP_STATES @@ -331,10 +331,7 @@ class ResCompany(models.Model): if not default_journal: raise UserError(_("Please install a chart of accounts or create a miscellaneous journal before proceeding.")) - today = datetime.today().date() - opening_date = today.replace(month=int(self.fiscalyear_last_month), day=self.fiscalyear_last_day) + timedelta(days=1) - if opening_date > today: - opening_date = opening_date + relativedelta(years=-1) + opening_date = self.account_opening_date - timedelta(days=1) self.account_opening_move_id = self.env['account.move'].create({ 'ref': _('Opening Journal Entry'), |
