mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: config company check partner data in invoice post
This commit is contained in:
@@ -320,7 +320,8 @@ class AccountMove(models.Model):
|
||||
Check invoice and receipts legal status
|
||||
"""
|
||||
if (
|
||||
move.is_invoice(include_receipts=True)
|
||||
move.company_id.check_min_partner_data_invoice
|
||||
and move.is_invoice(include_receipts=True)
|
||||
and not move.journal_id.is_simplified_invoice
|
||||
and (
|
||||
not move.partner_id or not move.partner_id._check_enought_invoice_data()
|
||||
|
||||
@@ -20,3 +20,10 @@ class ResCompany(models.Model):
|
||||
string="Privacy Policy",
|
||||
help="Authorization by the user for the" "manage of their personal data",
|
||||
)
|
||||
|
||||
check_min_partner_data_invoice = fields.Boolean(
|
||||
string="Check minimum partner data for invoices",
|
||||
help="""Check minimum partner data for invoices:
|
||||
- VAT, name, street, city, country""",
|
||||
default=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user