From 4414569b59fc91b7f4286748852b77e986697326 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 29 May 2024 15:20:48 +0700 Subject: add field shipping method --- fixco_custom/models/__init__.py | 3 ++- fixco_custom/models/partner.py | 7 +++++++ fixco_custom/models/res_partner.py | 7 ------- fixco_custom/models/sale.py | 7 +++++++ 4 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 fixco_custom/models/partner.py delete mode 100644 fixco_custom/models/res_partner.py create mode 100644 fixco_custom/models/sale.py (limited to 'fixco_custom/models') diff --git a/fixco_custom/models/__init__.py b/fixco_custom/models/__init__.py index 4c58886..30fb10d 100644 --- a/fixco_custom/models/__init__.py +++ b/fixco_custom/models/__init__.py @@ -1 +1,2 @@ -from . import res_partner \ No newline at end of file +from . import partner +from . import sale diff --git a/fixco_custom/models/partner.py b/fixco_custom/models/partner.py new file mode 100644 index 0000000..4f66b2b --- /dev/null +++ b/fixco_custom/models/partner.py @@ -0,0 +1,7 @@ +from odoo import models, fields, api + + +class Partner(models.Model): + _inherit = 'res.partner' + + test_new_fields = fields.Char(string='Test New Fields') diff --git a/fixco_custom/models/res_partner.py b/fixco_custom/models/res_partner.py deleted file mode 100644 index 112e7f0..0000000 --- a/fixco_custom/models/res_partner.py +++ /dev/null @@ -1,7 +0,0 @@ -from odoo import models, fields, api - - -class Partner(models.Model): - _inherit = 'res.partner' - - test_new_fields = fields.Char(string='Test New Fields') \ No newline at end of file diff --git a/fixco_custom/models/sale.py b/fixco_custom/models/sale.py new file mode 100644 index 0000000..6c49ac8 --- /dev/null +++ b/fixco_custom/models/sale.py @@ -0,0 +1,7 @@ +from odoo import models, fields, api + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + carrier_id = fields.Many2one('delivery.carrier', string='Shipping Method') -- cgit v1.2.3