Skip to content

Commit

Permalink
Merge pull request #29 from Gedeelde-Weelde/feat/GED-55-remove-uom-combo
Browse files Browse the repository at this point in the history
feat: GED-55: Removed uom combo field from uom translation.
  • Loading branch information
jurcello authored Dec 30, 2024
2 parents 495b0be + f7679af commit 65e6652
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion product_import_cwa/models/cwa_product_uom.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class CwaProductUom(models.Model):
uom_id = fields.Many2one("uom.uom", "Standard UoM", size=64, required=True)
uom_po_id = fields.Many2one("uom.uom", "Purchase UoM", size=64, required=True)
target_inhoud = fields.Float()
uos_combo = fields.Char("UoM/UoS Combo")

@api.model
def get_translated(self, source):
Expand Down
2 changes: 0 additions & 2 deletions product_import_cwa/views/cwa_product_uom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<field name="inhoud" />
<field name="uom_id" />
<field name="uom_po_id" />
<field name="uos_combo" />
</tree>
</field>
</record>
Expand All @@ -25,7 +24,6 @@
<field name="inhoud" />
<field name="uom_id" />
<field name="uom_po_id" />
<field name="uos_combo" />
</group>
</sheet>
</form>
Expand Down
3 changes: 0 additions & 3 deletions product_import_cwa/wizard/cwa_locate_uom_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def _default_uom_ids(self):
"cwa_product_id": this.id,
"eenheid": this.eenheid,
"inhoud": this.inhoud,
"uos_combo": combo,
},
)
)
Expand Down Expand Up @@ -55,7 +54,6 @@ class CwaProductImportWizard(models.TransientModel):
uom_id = fields.Many2one("uom.uom", "Standard UoM", size=64)
uom_po_id = fields.Many2one("uom.uom", "Purchase UoM", size=64)
target_inhoud = fields.Float()
uos_combo = fields.Char("UoM/UoS Combo")

# assume the purchase unit is same as uom, saves time!
@api.onchange("uom_id")
Expand All @@ -72,6 +70,5 @@ def action_apply(self):
"inhoud": this.inhoud,
"uom_id": this.uom_id.id,
"uom_po_id": this.uom_po_id.id,
"uos_combo": this.uos_combo,
}
self.env["cwa.product.uom"].create(values)
1 change: 0 additions & 1 deletion product_import_cwa/wizard/cwa_locate_uom_wizard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<field name="target_inhoud" />
<field name="uom_id" />
<field name="uom_po_id" />
<field name="uos_combo" readonly="0" />
</tree>
</field>
<footer>
Expand Down
2 changes: 0 additions & 2 deletions product_import_cwa/wizard/cwa_uom_translation_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class CwaUomTranslationWizard(models.TransientModel):
uom_id = fields.Many2one("uom.uom", "Standard UoM")
uom_po_id = fields.Many2one("uom.uom", "Purchase UoM")
target_inhoud = fields.Float()
uos_combo = fields.Char("UoM/UoS Combo")

def action_translate_product_uom(self):
for this in self:
Expand All @@ -29,6 +28,5 @@ def action_translate_product_uom(self):
"uom_id": this.uom_id.id,
"uom_po_id": this.uom_po_id.id,
"target_inhoud": this.target_inhoud,
"uos_combo": this.uos_combo,
}
)
1 change: 0 additions & 1 deletion product_import_cwa/wizard/cwa_uom_translation_wizard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<field name="uom_id" required="1" />
<field name="uom_po_id" required="1" />
<field name="target_inhoud" />
<field name="uos_combo" />
</group>
<footer>
<button
Expand Down

0 comments on commit 65e6652

Please sign in to comment.