Compare commits
1 Commits
14.0-add-o
...
14.0-remov
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80a8f674a7 |
@@ -10,7 +10,7 @@
|
|||||||
'summary': 'Better usability in base module',
|
'summary': 'Better usability in base module',
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['base', 'contacts'],
|
'depends': ['base'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/group.xml',
|
'security/group.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
|
|||||||
@@ -20,15 +20,6 @@
|
|||||||
<div attrs="{'invisible': [('same_vat_partner_id', '=', False)]}" position="attributes">
|
<div attrs="{'invisible': [('same_vat_partner_id', '=', False)]}" position="attributes">
|
||||||
<attribute name="class">alert alert-warning</attribute>
|
<attribute name="class">alert alert-warning</attribute>
|
||||||
</div>
|
</div>
|
||||||
<!-- Add a kanban button to open child partner -->
|
|
||||||
<xpath expr="//field[@name='child_ids']//kanban/templates/t/div" position="inside">
|
|
||||||
<div class="o_dropdown_kanban">
|
|
||||||
<a class="btn" role="button" title="Open"
|
|
||||||
t-att-href="'/web#id=' + record.id.raw_value + '&action=%(contacts.action_contacts)d' + '&menu_id=%(contacts.menu_contacts)d' + '&view_type=form&cids=1&model=res.partner'">
|
|
||||||
<span class="fa fa-external-link" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -10,17 +10,3 @@ class PurchaseOrder(models.Model):
|
|||||||
|
|
||||||
picking_type_id = fields.Many2one(tracking=True)
|
picking_type_id = fields.Many2one(tracking=True)
|
||||||
incoterm_id = fields.Many2one(tracking=True)
|
incoterm_id = fields.Many2one(tracking=True)
|
||||||
|
|
||||||
# inherit compute method of the field delivery_partner_id
|
|
||||||
# defined in purchase_usability
|
|
||||||
@api.depends('dest_address_id', 'picking_type_id')
|
|
||||||
def _compute_delivery_partner_id(self):
|
|
||||||
for o in self:
|
|
||||||
delivery_partner_id = False
|
|
||||||
if o.dest_address_id:
|
|
||||||
delivery_partner_id = o.dest_address_id
|
|
||||||
elif (
|
|
||||||
o.picking_type_id.warehouse_id and
|
|
||||||
o.picking_type_id.warehouse_id.partner_id):
|
|
||||||
delivery_partner_id = o.picking_type_id.warehouse_id.partner_id
|
|
||||||
o.delivery_partner_id = delivery_partner_id
|
|
||||||
|
|||||||
@@ -14,15 +14,6 @@ class PurchaseOrder(models.Model):
|
|||||||
payment_term_id = fields.Many2one(tracking=True)
|
payment_term_id = fields.Many2one(tracking=True)
|
||||||
fiscal_position_id = fields.Many2one(tracking=True)
|
fiscal_position_id = fields.Many2one(tracking=True)
|
||||||
partner_ref = fields.Char(tracking=True)
|
partner_ref = fields.Char(tracking=True)
|
||||||
# the field 'delivery_partner_id' is used in report
|
|
||||||
# the compute method of that field is inherited in purchase_stock_usability
|
|
||||||
delivery_partner_id = fields.Many2one(
|
|
||||||
'res.partner', compute='_compute_delivery_partner_id')
|
|
||||||
|
|
||||||
@api.depends('dest_address_id')
|
|
||||||
def _compute_delivery_partner_id(self):
|
|
||||||
for order in self:
|
|
||||||
order.delivery_partner_id = order.dest_address_id
|
|
||||||
|
|
||||||
def print_order(self):
|
def print_order(self):
|
||||||
report = self.env.ref('purchase.action_report_purchase_order')
|
report = self.env.ref('purchase.action_report_purchase_order')
|
||||||
|
|||||||
Reference in New Issue
Block a user