Skip to content
GitLab
  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • O odoo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • rex wu
  • odoo
  • Merge requests
  • !63

15.0

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged rex wu requested to merge 15.0 into deploy 1 year ago
  • Overview 0
  • Commits 2
  • Changes 4
  • rex wu @rexwu assigned to @rexwu 1 year ago

    assigned to @rexwu

  • rex wu @rexwu mentioned in commit 909ef2bf 1 year ago

    mentioned in commit 909ef2bf

  • rex wu @rexwu merged 1 year ago

    merged

  • Loading
  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • deploy (base)

and
  • latest version
    340eae29
    2 commits, 1 year ago

4 files
+ 21
- 1

    Preferences

    File browser
    Compare changes
extra-addo‎ns/kci-mrp‎
mod‎els‎
mrp_b‎om.py‎ +1 -0
produ‎ct.py‎ +4 -0
vi‎ews‎
mrp_bom_‎views.xml‎ +2 -1
mrp_produc‎t_views.xml‎ +14 -0
extra-addons/kci-mrp/models/mrp_bom.py
+ 1
- 0
  • View file @ 340eae29

  • Edit in single-file editor

  • Open in Web IDE


@@ -186,6 +186,7 @@ class BomLine(models.Model):
('purchase', '採購'),
('stock', '庫存')
], string='來源', default='stock')
spec = fields.Char(string='規格/型號/材質', related='product_tmpl_id.spec', store=True)
@api.depends('quotation_price', 'product_qty')
def _compute_quotation_subtotal(self):
extra-addons/kci-mrp/models/product.py
+ 4
- 0
  • View file @ 340eae29

  • Edit in single-file editor

  • Open in Web IDE


@@ -19,6 +19,8 @@ class Product(models.Model):
('cb', '電控箱'),
('ec', '電子材料')], default=lambda self: 'product' if self.product_type == 'component' else 'none', string='物料類型')
spec = fields.Char(size=100, string='規格/型號/材質', tracking=True)
class ProductTemplate(models.Model):
_inherit = "product.template"
@@ -36,3 +38,5 @@ class ProductTemplate(models.Model):
('cb', '電控箱'),
('ec', '電子材料')], default=lambda self: 'product' if self.product_type == 'component' else 'none',
string='物料類型')
spec = fields.Char(size=100, string='規格/型號/材質', tracking=True)
extra-addons/kci-mrp/views/mrp_bom_views.xml
+ 2
- 1
  • View file @ 340eae29

  • Edit in single-file editor

  • Open in Web IDE


@@ -28,6 +28,7 @@
</xpath>
<xpath expr="//field/tree/field[@name='product_id']" position="after">
<field name="spec" attrs="{'column_invisible': [('parent.status', '!=', 'external')]}"/>
<field name="quotation_name" attrs="{'column_invisible': [('parent.status', '!=', 'quotation')]}"/>
</xpath>
@@ -51,7 +52,7 @@
<xpath expr="//sheet/notebook/page/field[@name='bom_line_ids']/tree/field[@name='product_id']" position="attributes">
<attribute name="readonly">0</attribute>
<attribute name="domain">[('product_type', '=', 'component'), ('company_id', 'in', [company_id, False])]</attribute>
<attribute name="domain">[('product_type', '=', 'component')]</attribute>
</xpath>
</field>
extra-addons/kci-mrp/views/mrp_product_views.xml
+ 14
- 0
  • View file @ 340eae29

  • Edit in single-file editor

  • Open in Web IDE


@@ -8,6 +8,20 @@
<xpath expr="//field[@name='detailed_type']" position="before">
<field name="product_type" readonly="1"/>
<field name="component_type"/>
<field name="spec"/>
</xpath>
</field>
</record>
<record id="view_mrp_product_spec_kanban" model="ir.ui.view">
<field name="name">product.kanban.mrp.product_spec</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_kanban_view"/>
<field name="arch" type="xml">
<xpath expr="//kanban/templates/t/div/div/div[@name='product_lst_price']" position="replace">
<div class="mt-1">
規格/型號/材質:<field name="spec"/>
</div>
</xpath>
</field>
</record>
Assignee
rex wu's avatar
rex wu
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
rex wu
Reference: rexwu/odoo!63
Source branch: 15.0

Menu

Projects Groups Snippets
Help