legaladdress_from_customer
This commit is contained in:
+1
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "Invoice address same as customer",
|
||||||
|
"version": "16.0.1.0.0",
|
||||||
|
"category": "Accounting",
|
||||||
|
"summary": "Keep invoice address exactly the same as the selected customer",
|
||||||
|
"description": """
|
||||||
|
When selecting a customer on an invoice, the invoice address
|
||||||
|
(partner_invoice_id) is set to exactly the same partner record,
|
||||||
|
without collapsing to the commercial parent.
|
||||||
|
""",
|
||||||
|
"depends": [
|
||||||
|
"account",
|
||||||
|
],
|
||||||
|
"data": [],
|
||||||
|
"installable": True,
|
||||||
|
"application": False,
|
||||||
|
"license": "LGPL-3",
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from . import account_move
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class AccountMove(models.Model):
|
||||||
|
_inherit = "account.move"
|
||||||
|
|
||||||
|
@api.onchange("partner_id")
|
||||||
|
def _onchange_partner_copy_to_invoice_address(self):
|
||||||
|
for move in self:
|
||||||
|
if move.partner_id:
|
||||||
|
# Copy Klant exactly to Factuuradres
|
||||||
|
move.partner_invoice_id = move.partner_id
|
||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
Executable
+16
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Invoice legal address from customer",
|
||||||
|
"version": "16.0.1.0.0",
|
||||||
|
"category": "Accounting",
|
||||||
|
"summary": "Use the exact customer as invoice address",
|
||||||
|
"description": """
|
||||||
|
Copies the selected customer (Klant) directly to the invoice address
|
||||||
|
on sale orders and invoices, without collapsing to the commercial partner.
|
||||||
|
""",
|
||||||
|
"depends": [
|
||||||
|
"account",
|
||||||
|
"sale",
|
||||||
|
],
|
||||||
|
"installable": True,
|
||||||
|
"license": "LGPL-3",
|
||||||
|
}
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
from . import account_move
|
||||||
|
from . import sale_order
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class AccountMove(models.Model):
|
||||||
|
_inherit = "account.move"
|
||||||
|
|
||||||
|
@api.onchange("partner_id")
|
||||||
|
def _onchange_partner_copy_to_invoice_address(self):
|
||||||
|
for move in self:
|
||||||
|
if move.partner_id:
|
||||||
|
# Copy Klant exactly to Factuuradres
|
||||||
|
move.partner_invoice_id = move.partner_id
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class SaleOrder(models.Model):
|
||||||
|
_inherit = "sale.order"
|
||||||
|
|
||||||
|
@api.onchange("partner_id")
|
||||||
|
def _onchange_partner_copy_to_invoice_address(self):
|
||||||
|
for order in self:
|
||||||
|
if order.partner_id:
|
||||||
|
# Copy Klant exactly to Factuuradres
|
||||||
|
order.partner_invoice_id = order.partner_id
|
||||||
Reference in New Issue
Block a user