mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-11-25 07:02:06 +00:00
35 lines
1.4 KiB
Python
35 lines
1.4 KiB
Python
# Copyright 2024 Alberto Martínez <alberto.martinez@sygel.es>
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from flectra import api, fields, models
|
|
|
|
|
|
class ResPartner(models.Model):
|
|
_inherit = "res.partner"
|
|
|
|
sale_default_mandate_contact = fields.Selection(
|
|
selection=[
|
|
("partner_id", "Customer Mandate"),
|
|
("commercial_partner_id", "Commercial Customer Mandate"),
|
|
("partner_invoice_id", "Invoice Address Mandate"),
|
|
("partner_shipping_id", "Delivery Address Mandate"),
|
|
],
|
|
string="Default Sale Mandate Contact",
|
|
help="The partner of the sales in which flectra will search for the mandate\n"
|
|
"- Customer Mandate: Flectra will look the mandate in the sale partner,"
|
|
" whether is an individual or the company\n"
|
|
"- Commercial Customer Mandate: Flectra will look the mandate in the"
|
|
" sale partner company\n"
|
|
"- Invoice Address Mandate: Flectra will look the mandate in the"
|
|
" sale invoice address\n"
|
|
"- Delivery Address Mandate: Flectra will look the mandate in the"
|
|
" sale delivery address\n"
|
|
"- False: Flectra will use the company configuration option",
|
|
)
|
|
|
|
@api.model
|
|
def _commercial_fields(self):
|
|
return super()._commercial_fields() + [
|
|
"sale_default_mandate_contact",
|
|
]
|