Skip to content
Open
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
38 changes: 38 additions & 0 deletions sale_address_domain/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
===================
Sale address domain
===================

.. |badge1| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3


|badge1|

In sales orders let only select shipping and billing addresses.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/avanzosc/sale-addons/issues>`_. In case of trouble,
please check there if your issue has already been reported. If you spotted
it first, help us smash it by providing detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* AvanzOSC

Contributors
~~~~~~~~~~~~

* `AvanzOsc <http://www.avanzosc.es>`_:

* Alfredo de la Fuente <alfredodelafuente@avanzosc.es>
* Ana Juaristi <anajuaristi@avanzosc.es>
1 change: 1 addition & 0 deletions sale_address_domain/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions sale_address_domain/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2019 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Sale Address Domain",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"depends": [
"sale",
],
"author": "AvanzOSC",
"website": "https://github.com/avanzosc/sale-addons",
"category": "Sales",
"data": [],
"installable": True,
}
1 change: 1 addition & 0 deletions sale_address_domain/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
18 changes: 18 additions & 0 deletions sale_address_domain/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2022 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models


class SaleOrder(models.Model):
_inherit = "sale.order"

partner_invoice_id = fields.Many2one(
domain="['|', ('id', '=', partner_id), ('type','=','invoice'),"
"('parent_id','child_of',partner_id), '|', ('company_id', '=', False),"
"('company_id', '=', company_id)]"
)
partner_shipping_id = fields.Many2one(
domain="['|', ('id', '=', partner_id), ('type','=','delivery'),"
"('parent_id','child_of',partner_id), '|', ('company_id', '=', False),"
"('company_id', '=', company_id)]"
)
1 change: 1 addition & 0 deletions setup/sale_address_domain/odoo/addons/sale_address_domain
6 changes: 6 additions & 0 deletions setup/sale_address_domain/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)