diff --git a/__init__.py b/__init__.py index f86d099b2904434e187c36971eaea4f2e77a695d..957992f377d7ce8942a87238397684babc5eb305 100644 --- a/__init__.py +++ b/__init__.py @@ -1,2 +1,4 @@ -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +# Copyright 2021 Le Filament (<http://www.le-filament.com>) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from . import models diff --git a/__manifest__.py b/__manifest__.py index 1c82eb0308076dc61c03195421b1dd024d6e2597..ebf5bc909436f29b40a57ae0dedc96e540bdbe3f 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -12,5 +12,6 @@ "data": [ "views/account_bank_statement.xml", "views/account_move_line.xml", + "views/account_views.xml", ] } diff --git a/models/__init__.py b/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..783ab68d39d33d8931f450b94156267a5358f39d --- /dev/null +++ b/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2021 Le Filament (<http://www.le-filament.com>) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import account diff --git a/models/account.py b/models/account.py new file mode 100644 index 0000000000000000000000000000000000000000..2973dc47d5885d7f70947ea8c7e3dd2bc29c3991 --- /dev/null +++ b/models/account.py @@ -0,0 +1,45 @@ +# Copyright 2021 Le Filament (<http://www.le-filament.com>) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models, api + + +class AccountInvoice(models.Model): + _inherit = "account.invoice" + + # ------------------------------------------------------ + # Fields declaration + # ------------------------------------------------------ + user_second_id = fields.Many2one( + 'res.users', + string='Vendeur Bis', + track_visibility='onchange', + default=lambda self: self.env.user, copy=False) + + # ------------------------------------------------------ + # SQL Constraints + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Default methods + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Computed fields / Search Fields + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Onchange / Constraints + # ------------------------------------------------------ + + # ------------------------------------------------------ + # CRUD methods (ORM overrides) + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Actions + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Business methods + # ------------------------------------------------------ diff --git a/views/account_views.xml b/views/account_views.xml new file mode 100644 index 0000000000000000000000000000000000000000..7cb6054e6028ca536d8653de085f75a28fdeefde --- /dev/null +++ b/views/account_views.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="invoice_form" model="ir.ui.view"> + <field name="name">account.3a.invoice.form</field> + <field name="model">account.invoice</field> + <field name="inherit_id" ref="account.invoice_form"/> + <field name="arch" type="xml"> + <field name="user_id" position="after"> + <field name="user_second_id"/> + </field> + </field> + </record> + + </data> +</odoo> \ No newline at end of file