Skip to content

Merging onboarding level 1 tasks #4809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ package.json
/man/
/share/
/src/

venv/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary diff that

22 changes: 22 additions & 0 deletions addons/account/models/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,20 @@ class ResCompany(models.Model):
'prefix': 'BATCH/%(year)s/',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the solution would be to change the BATCH to -> PAY and modify the test accordingly

}),
)

group_payment_sequence_id = fields.Many2one(
comodel_name='ir.sequence',
readonly=True,
copy=False,
default=lambda self: self.env['ir.sequence'].sudo().create({
'name': _("Group Payment Number Sequence"),
'implementation': 'no_gap',
'padding': 5,
'use_date_range': True,
'company_id': self.id,
'prefix': 'PAY/%(year)s/',
}),
)

#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.")
Expand Down Expand Up @@ -277,6 +291,14 @@ def get_next_batch_payment_communication(self):
'''
self.ensure_one()
return self.sudo().batch_payment_sequence_id.next_by_id()

def get_next_group_payment_communication(self):
'''
When in need of a group payment communication reference (several invoices paid at the same time)
use group_payment_sequence_id to get it (eventually create it first): e.g PAY/2025/00001
'''
self.ensure_one()
return self.sudo().group_payment_sequence_id.next_by_id()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for that if the field is gone 😄


def _get_company_root_delegated_field_names(self):
return super()._get_company_root_delegated_field_names() + [
Expand Down
2 changes: 1 addition & 1 deletion addons/account/views/account_menuitem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<menuitem id="account_reports_partners_reports_menu" name="Partner Reports" sequence="3"/>
<menuitem id="account_reports_management_menu" name="Management" sequence="4">
<menuitem id="menu_action_account_invoice_report_all" name="Invoice Analysis" action="action_account_invoice_report_all" sequence="1"/>
<menuitem id="menu_action_analytic_reporting" name="Analytic Report" action="action_analytic_reporting" groups="account.group_account_readonly"/>
<menuitem id="menu_action_analytic_reporting" name="Analytic Report" action="action_analytic_reporting" groups="analytic.group_analytic_accounting" />
</menuitem>
<menuitem id="account_reports_legal_statements_menu" name="Statement Reports" sequence="1" groups="account.group_account_readonly"/>
</menuitem>
Expand Down
2 changes: 1 addition & 1 deletion addons/account/wizard/account_payment_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _get_communication(self, lines):
move = lines.move_id
label = move.payment_reference or move.ref or move.name
else:
label = self.company_id.get_next_batch_payment_communication()
label = self.company_id.get_next_group_payment_communication()
return label

@api.model
Expand Down