summaryrefslogtreecommitdiff
path: root/fixco_custom/models/sale.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-05-30 15:06:15 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-05-30 15:06:15 +0700
commitacd06377bb5c4b375fadf3ad37a7ad5853ed79b3 (patch)
treeaef72c07173801e6836e5a8bc3ad87763dd9b0ad /fixco_custom/models/sale.py
parentc7f63c374488c2f28dedc070308dadb5cfc1f9bd (diff)
push
Diffstat (limited to 'fixco_custom/models/sale.py')
-rwxr-xr-xfixco_custom/models/sale.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/fixco_custom/models/sale.py b/fixco_custom/models/sale.py
index 8764681..24ac70a 100755
--- a/fixco_custom/models/sale.py
+++ b/fixco_custom/models/sale.py
@@ -5,5 +5,26 @@ from odoo.exceptions import UserError
class SaleOrder(models.Model):
_inherit = "sale.order"
- carrier_id = fields.Many2one('delivery.carrier', string='Shipping Method')
- order_reference = fields.Char(string='Order Reference')
+ carrier = fields.Char(string='Shipping Method')
+ invoice_mp = fields.Char(string='Invoice Marketplace')
+ order_reference = fields.Char(string='Order Reference')
+
+ # def open_form_multi_create_invoices(self):
+ # action = self.env['ir.actions.act_window']._for_xml_id('fixco_custom.action_sale_order_multi_invoices')
+ # action['context'] = {
+ # 'so_ids': [x.id for x in self]
+ # }
+ # return action
+
+ def open_form_multi_create_invoices(self):
+ return {
+ 'name': _('Create Invoices'),
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'sale.order.multi_invoices',
+ 'view_mode': 'form',
+ 'target': 'new',
+ 'context': {
+ 'so_ids': self.ids,
+ }
+ }
+