Changes between Version 2 and Version 4 of Ticket #27708


Ignore:
Timestamp:
Jan 9, 2017, 12:34:54 PM (8 years ago)
Author:
felipeps
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27708 – Description

    v2 v4  
    2323product model/table does not have a field for the relation.
    2424
     25
     26**Examples models:**
     27{{{
     28class ClientProductSaleStc():
     29    local_id = models.ForeignKey(EstoqueLocal, db_column='local_id')
     30    empresa_id = models.ForeignKey(Sced015, db_column='empresa_id')
     31    subcategoria_id = models.ForeignKey(ProdutoSubcategoria, db_column='subcategoria_id')
     32    produto_id = models.ForeignKey(ProdutoProduto, db_column='produto_id')
     33    setor_id = models.ForeignKey(Product, db_column='setor_id')
     34
     35    class Meta:
     36        db_table = 'client_product_sale_stc'
     37
     38
     39class Product():
     40    recnum = models.BigIntegerField(unique=True)
     41    hor_due = models.DecimalField(max_digits=2, decimal_places=0)
     42    min_due = models.DecimalField(max_digits=2, decimal_places=0)
     43
     44    class Meta:
     45        db_table = '"dataflex"."product"'
     46}}}
     47
     48
Back to Top