Browse Source

trying to bring lost fields back

pull/12/head
gregoire 8 years ago
parent
commit
9e92d0d14f
  1. 19
      beesdoo_product/models/beesdoo_product.py

19
beesdoo_product/models/beesdoo_product.py

@ -6,13 +6,23 @@ import datetime
class BeesdooProduct(models.Model):
_inherit = "product.template"
eco_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'eco')])
local_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'local')])
fair_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'fair')])
origin_label = fields.Many2one('beesdoo.product.label', domain = [('type', '=', 'delivery')])
eco_label = fields.Many2one('beesdoo.product.label', domain=[('type', '=', 'eco')])
local_label = fields.Many2one('beesdoo.product.label', domain=[('type', '=', 'local')])
fair_label = fields.Many2one('beesdoo.product.label', domain=[('type', '=', 'fair')])
origin_label = fields.Many2one('beesdoo.product.label', domain=[('type', '=', 'delivery')])
display_unit = fields.Many2one('product.uom', required=True)
default_reference_unit = fields.Many2one('product.uom', required=True)
display_weight = fields.Float(compute='get_display_weight')
total_with_vat = fields.Float(compute='get_total_with_vat')
total_with_vat_by_unit = fields.Float(compute='get_total_with_vat_by_unit')
main_seller_id = fields.Many2one('res.partner', compute='_compute_main_seller_id', store=True)
label_to_be_printed = fields.Boolean('Print label?')
label_last_printed = fields.Datetime('Label last printed on')
@ -55,7 +65,6 @@ class BeesdooProduct(models.Model):
self.label_last_printed = datetime.datetime.now()
class BeesdooProductLabel(models.Model):
_name = "beesdoo.product.label"

Loading…
Cancel
Save